Don't break the API

This commit is contained in:
Chocobozzz 2024-07-31 13:23:28 +02:00
parent bba6538435
commit 68b7a69f99
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 1 additions and 1 deletions

View File

@ -403,7 +403,7 @@ export const usersCheckCurrentPasswordFactory = (targetUserIdGetter: (req: expre
if (await user.isPasswordMatch(req.body.currentPassword) !== true) { if (await user.isPasswordMatch(req.body.currentPassword) !== true) {
return res.fail({ return res.fail({
status: HttpStatusCode.UNAUTHORIZED_401, status: HttpStatusCode.FORBIDDEN_403,
message: 'currentPassword is invalid.', message: 'currentPassword is invalid.',
type: ServerErrorCode.CURRENT_PASSWORD_IS_INVALID type: ServerErrorCode.CURRENT_PASSWORD_IS_INVALID
}) })