From cc9a26d59fdf674977206d15894be85eda67a7fc Mon Sep 17 00:00:00 2001 From: Dustin Do Date: Mon, 15 Jul 2024 16:00:06 +0700 Subject: [PATCH] fix(api): fix auth middleware typing (#120) --- apps/api/v1/middlewares/auth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/v1/middlewares/auth.ts b/apps/api/v1/middlewares/auth.ts index 0ebedb7d..df724a91 100644 --- a/apps/api/v1/middlewares/auth.ts +++ b/apps/api/v1/middlewares/auth.ts @@ -32,7 +32,7 @@ export const authMiddleware = createMiddleware(async (c, next) => { await next() }) -export const getAuthUser = (c: Context) => c.get('user') +export const getAuthUser = (c: Context) => c.get('user') as User | null export const getAuthUserStrict = (c: Context) => { const user = getAuthUser(c)