fix: correct userPasscode validation and remove unused import in setPasscodeForMobile

This commit is contained in:
2026-01-30 15:35:57 +05:30
parent 46c8432582
commit 745e4fa73f
2 changed files with 2 additions and 3 deletions

View File

@@ -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,
}),
};
});

View File

@@ -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()