From e2de706abff59381754ead6887bbe5fd324274fa Mon Sep 17 00:00:00 2001 From: Rory& Date: Thu, 18 Dec 2025 01:24:37 +0100 Subject: Avoid re-fetching user if not requesting extra fields --- src/api/routes/users/@me/mfa/codes-verification.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/api/routes/users/@me/mfa') diff --git a/src/api/routes/users/@me/mfa/codes-verification.ts b/src/api/routes/users/@me/mfa/codes-verification.ts index 4cc4c072..94213037 100644 --- a/src/api/routes/users/@me/mfa/codes-verification.ts +++ b/src/api/routes/users/@me/mfa/codes-verification.ts @@ -46,7 +46,7 @@ router.post( // TODO: We don't have email/etc etc, so can't send a verification code. // Once that's done, this route can verify `key` - // const user = await User.findOneOrFail({ where: { id: req.user_id } }); + // const user = req.user; if ((await User.count({ where: { id: req.user_id } })) === 0) throw DiscordApiErrors.UNKNOWN_USER; let codes: BackupCode[]; -- cgit 1.5.1