summary refs log tree commit diff
path: root/src/api/routes/auth/mfa
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-03-16 11:31:24 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-03-16 11:31:24 +1100
commit4d06b86d7b9867f77aafc91512e8c4acf3ae3eff (patch)
tree442353828a5c3a667e078e657198c3b571a9df91 /src/api/routes/auth/mfa
parentRemove client_test folder (diff)
downloadserver-ts-4d06b86d7b9867f77aafc91512e8c4acf3ae3eff.tar.xz
Fix UserSettings relation being in `select` rather than `relations`
Diffstat (limited to 'src/api/routes/auth/mfa')
-rw-r--r--src/api/routes/auth/mfa/totp.ts3
-rw-r--r--src/api/routes/auth/mfa/webauthn.ts3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/api/routes/auth/mfa/totp.ts b/src/api/routes/auth/mfa/totp.ts

index 65cdd397..6236d209 100644 --- a/src/api/routes/auth/mfa/totp.ts +++ b/src/api/routes/auth/mfa/totp.ts
@@ -34,7 +34,8 @@ router.post( where: { totp_last_ticket: ticket, }, - select: ["id", "totp_secret", "settings"], + select: ["id", "totp_secret"], + relations: ["settings"], }); const backup = await BackupCode.findOne({ diff --git a/src/api/routes/auth/mfa/webauthn.ts b/src/api/routes/auth/mfa/webauthn.ts
index c4334c4c..a9fa78b2 100644 --- a/src/api/routes/auth/mfa/webauthn.ts +++ b/src/api/routes/auth/mfa/webauthn.ts
@@ -54,7 +54,8 @@ router.post( where: { totp_last_ticket: ticket, }, - select: ["id", "settings"], + select: ["id"], + relations: ["settings"], }); const ret = await verifyWebAuthnToken(ticket);