mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-23 02:13:00 +00:00
Deprecation: Use object-based relations for typeorm
This commit is contained in:
1 parent
7c247aedb9
commit
6162fbd520
55 files changed
+151
-137
No files matched your search
@@ -68,7 +68,7 @@ router.post(
|
||||
const user = await User.findOneOrFail({
|
||||
where: [{ phone: login }, { email: login }],
|
||||
select: { data: true, id: true, disabled: true, deleted: true, totp_secret: true, mfa_enabled: true, webauthn_enabled: true, security_keys: true, verified: true },
|
||||
relations: ["security_keys", "settings"],
|
||||
relations: { security_keys: true, settings: true },
|
||||
}).catch(() => {
|
||||
throw FieldErrors({
|
||||
login: {
|
||||
|
||||
@@ -46,7 +46,7 @@ router.post(
|
||||
totp_last_ticket: ticket,
|
||||
},
|
||||
select: { id: true, totp_secret: true },
|
||||
relations: ["settings"],
|
||||
relations: { settings: true },
|
||||
});
|
||||
|
||||
const backup = await BackupCode.findOne({
|
||||
|
||||
@@ -55,7 +55,7 @@ router.post(
|
||||
totp_last_ticket: ticket,
|
||||
},
|
||||
select: { id: true },
|
||||
relations: ["settings"],
|
||||
relations: { settings: true },
|
||||
});
|
||||
|
||||
const ret = await verifyWebAuthnToken(ticket);
|
||||
|
||||
Reference in new issue
Block a user