From 745e4fa73f20a68c7b001e20982202cbc70cdd55 Mon Sep 17 00:00:00 2001 From: Mayank Mishra Date: Fri, 30 Jan 2026 15:35:57 +0530 Subject: [PATCH] fix: correct userPasscode validation and remove unused import in setPasscodeForMobile --- .../user/handlers/authentication/setPasscodeForMobile.ts | 3 +-- src/modules/user/services/user.service.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/modules/user/handlers/authentication/setPasscodeForMobile.ts b/src/modules/user/handlers/authentication/setPasscodeForMobile.ts index 520e8b1..0e4ef51 100644 --- a/src/modules/user/handlers/authentication/setPasscodeForMobile.ts +++ b/src/modules/user/handlers/authentication/setPasscodeForMobile.ts @@ -42,7 +42,7 @@ export const handler = safeHandler(async ( const { userPasscode } = body; // Validate required fields - if (!userPasscode ) { + if (!userPasscode) { throw new ApiError(400, 'userPasscode is required'); } @@ -59,7 +59,6 @@ export const handler = safeHandler(async ( body: JSON.stringify({ success: true, message: 'Passcode set successfully', - data: null, }), }; }); \ No newline at end of file diff --git a/src/modules/user/services/user.service.ts b/src/modules/user/services/user.service.ts index e3f50c3..a0b99a7 100644 --- a/src/modules/user/services/user.service.ts +++ b/src/modules/user/services/user.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { PrismaClient, User } from '@prisma/client'; -import { AddPersonalInfoDTO, SetPasscodeDTO } from '../dto/user.dto'; +import { AddPersonalInfoDTO } from '../dto/user.dto'; import ApiError from '@/common/utils/helper/ApiError'; import * as bcrypt from 'bcryptjs'; @Injectable()