From e4ca9590bd3d145e91ba54b24ad2ce4a9d213851 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 26 Apr 2023 19:58:26 -0700 Subject: [PATCH] fix? --- packages/backend/src/server/api/private/verify-email.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/backend/src/server/api/private/verify-email.ts b/packages/backend/src/server/api/private/verify-email.ts index a5cc8d0a0..e6c8295d1 100644 --- a/packages/backend/src/server/api/private/verify-email.ts +++ b/packages/backend/src/server/api/private/verify-email.ts @@ -7,9 +7,7 @@ export default async (ctx: Koa.Context) => { const code = body["code"]; - const profile = await UserProfiles.findOneBy({ - emailVerifyCode: ctx.params.code, - }); + const profile = await UserProfiles.findOneByOrFail({ emailVerifyCode: code }); if (profile != null) { ctx.body = "Verify succeeded!";