Skip to content

Commit

Permalink
changed status code to using http-status-codes
Browse files Browse the repository at this point in the history
  • Loading branch information
javtran committed Aug 15, 2024
1 parent fbe7fc2 commit f8f3c0b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/routes/api/v1/auth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@ export default async function (fastify, _opts) {
return reply.unauthorized();
}
if (!user.isEmailVerified) {
return reply.status(403).send({
return reply.status(StatusCodes.FORBIDDEN).send({
message:
'Your account has not been verified. Please check your inbox to verify your account.',
});
}
if (user.isRejected || user.isDisabled) {
return reply.status(403).send({
return reply.status(StatusCodes.FORBIDDEN).send({
message:
'Your account has been rejected or disabled by admins. Please contact support for further instructions.',
});
}
if (user.isUnapproved) {
return reply.status(403).send({
return reply.status(StatusCodes.FORBIDDEN).send({
message:
'Your account has not been approved by admins yet. Please contact support or wait for further instructions.',
});
Expand Down

0 comments on commit f8f3c0b

Please sign in to comment.