From a44fee3aae11b63fdd3ed5fa4a232c728f39babf 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 a5cc8d0a00..e6c8295d18 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!";