From f35b7f14280dfb41e1bef43a6ffce0a744748460 Mon Sep 17 00:00:00 2001 From: Qin Guan Date: Sun, 16 Jul 2023 16:05:54 +0800 Subject: [PATCH] chore: debug --- server/trpc/routers/me/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/trpc/routers/me/index.ts b/server/trpc/routers/me/index.ts index d7c7943..063cb99 100644 --- a/server/trpc/routers/me/index.ts +++ b/server/trpc/routers/me/index.ts @@ -10,8 +10,10 @@ export const meRouter = router({ get: protectedProcedure .meta({ participants: true }) .query(async ({ ctx }) => { - if (await userStorage.hasItem(ctx.session.user.id)) + if (await userStorage.hasItem(ctx.session.user.id)) { + console.log('cached from redis') return await userStorage.getItem(ctx.session.user.id) + } const user = await ctx.prisma.user.findUniqueOrThrow({ where: { id: ctx.session.user.id },