fix: correct userPasscode validation and remove unused import in setPasscodeForMobile
This commit is contained in:
@@ -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,
|
||||
}),
|
||||
};
|
||||
});
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user