summary refs log tree commit diff
path: root/api/src/routes/auth
diff options
context:
space:
mode:
Diffstat (limited to 'api/src/routes/auth')
-rw-r--r--api/src/routes/auth/mfa/totp.ts2
-rw-r--r--api/src/routes/auth/register.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/api/src/routes/auth/mfa/totp.ts b/api/src/routes/auth/mfa/totp.ts

index cec6e5ee..255cf889 100644 --- a/api/src/routes/auth/mfa/totp.ts +++ b/api/src/routes/auth/mfa/totp.ts
@@ -26,7 +26,7 @@ router.post("/", route({ body: "TotpSchema" }), async (req: Request, res: Respon ], }); - const backup = await BackupCode.findOne({ code: code, expired: false, consumed: false, user: { id: user.id }}); + const backup = await BackupCode.findOne({ where: { code: code, expired: false, consumed: false, user: { id: user.id } } }); if (!backup) { const ret = verifyToken(user.totp_secret!, code); diff --git a/api/src/routes/auth/register.ts b/api/src/routes/auth/register.ts
index 9816c5fd..2902c8dd 100644 --- a/api/src/routes/auth/register.ts +++ b/api/src/routes/auth/register.ts
@@ -107,7 +107,7 @@ router.post("/", route({ body: "RegisterSchema" }), async (req: Request, res: Re } // check if there is already an account with this email - const exists = await User.findOne({ email: email }); + const exists = await User.findOne({ where: { email: email } }); if (exists) { throw FieldErrors({