mirror of
https://github.com/PretendoNetwork/account.git
synced 2026-10-01 22:58:05 -05:00
fix: remove unnecessary non-null assertion
This commit is contained in:
@@ -21,7 +21,7 @@ export async function updatePassword(request: UpdatePasswordRequest,
|
||||
const newPassword = request.newPassword.trim();
|
||||
const newPasswordConfirm = request.newPasswordConfirm.trim();
|
||||
|
||||
const hashedOldPassword = nintendoPasswordHash(oldPassword!, pnid.pid); // * We know password will never be null here
|
||||
const hashedOldPassword = nintendoPasswordHash(oldPassword, pnid.pid);
|
||||
|
||||
if (!bcrypt.compareSync(hashedOldPassword, pnid.password)) {
|
||||
throw new ServerError(Status.INVALID_ARGUMENT, 'Password is incorrect');
|
||||
|
||||
Reference in New Issue
Block a user