diff options
| author | Mohamed Bassem <me@mbassem.com> | 2025-07-21 00:33:33 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2025-07-21 00:33:33 +0000 |
| commit | bb11907e8b04d519c4ea3e67d4c7ce5a6226914b (patch) | |
| tree | 4dd81c88aad12ee9b6db2a81e0190baac56a6b31 /packages/trpc/routers/users.ts | |
| parent | 52ac0869d53b54e91db557f012f7ee9a3ecc3e9d (diff) | |
| download | karakeep-bb11907e8b04d519c4ea3e67d4c7ce5a6226914b.tar.zst | |
fix: Remove bcrypt from the api key validation route
Diffstat (limited to 'packages/trpc/routers/users.ts')
| -rw-r--r-- | packages/trpc/routers/users.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/trpc/routers/users.ts b/packages/trpc/routers/users.ts index 97784901..6aa12454 100644 --- a/packages/trpc/routers/users.ts +++ b/packages/trpc/routers/users.ts @@ -264,7 +264,11 @@ export const usersAppRouter = router({ invariant(ctx.user.email, "A user always has an email specified"); let user; try { - user = await validatePassword(ctx.user.email, input.currentPassword); + user = await validatePassword( + ctx.user.email, + input.currentPassword, + ctx.db, + ); } catch { throw new TRPCError({ code: "UNAUTHORIZED" }); } @@ -319,7 +323,7 @@ export const usersAppRouter = router({ } try { - await validatePassword(ctx.user.email, input.password); + await validatePassword(ctx.user.email, input.password, ctx.db); } catch { throw new TRPCError({ code: "UNAUTHORIZED", |
