Skip to content

Commit

Permalink
fix: 200 on email exists
Browse files Browse the repository at this point in the history
  • Loading branch information
harshalranjhani committed Jul 10, 2024
1 parent 546357d commit 66d79f8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,7 @@ export class AuthService {
}
})
if (checkUser) {
return {
error: "User exist",
statusCode: 400,
message: 'User already exists',
};
throw new UnauthorizedException(['User already exist']);
}
const user = await this.prisma.user.create({
data: {
Expand Down

0 comments on commit 66d79f8

Please sign in to comment.