diff options
Diffstat (limited to 'src/api/routes/auth/mfa/totp.ts')
-rw-r--r-- | src/api/routes/auth/mfa/totp.ts | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/api/routes/auth/mfa/totp.ts b/src/api/routes/auth/mfa/totp.ts index 4df408f9..956993b3 100644 --- a/src/api/routes/auth/mfa/totp.ts +++ b/src/api/routes/auth/mfa/totp.ts @@ -59,11 +59,7 @@ router.post( if (!backup) { const ret = verifyToken(user.totp_secret || "", code); - if (!ret || ret.delta != 0) - throw new HTTPError( - req.t("auth:login.INVALID_TOTP_CODE"), - 60008, - ); + if (!ret || ret.delta != 0) throw new HTTPError(req.t("auth:login.INVALID_TOTP_CODE"), 60008); } else { backup.consumed = true; await backup.save(); @@ -75,7 +71,7 @@ router.post( token: await generateToken(user.id), settings: { ...user.settings, index: undefined }, }); - }, + } ); export default router; |