refactor: reinstate drizzle

This commit is contained in:
Henry
2025-04-23 13:11:00 +01:00
parent 0c25fe3864
commit c1348cf455
22 changed files with 1964 additions and 879 deletions

View File

@@ -37,7 +37,7 @@ export const userRouter = createTRPCRouter({
code: "UNAUTHORIZED",
});
const result = await userRepo.getById(ctx.db, userId);
const result = await userRepo.getById(ctx.drizzleDb, userId);
if (!result?.name) {
throw new TRPCError({
@@ -81,7 +81,7 @@ export const userRouter = createTRPCRouter({
code: "UNAUTHORIZED",
});
const result = await userRepo.update(ctx.adminDb, userId, input);
const result = await userRepo.update(ctx.db, userId, input);
if (!result) {
throw new TRPCError({