Skip to content

Commit

Permalink
fix(api): fix auth middleware typing (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
duongdev authored Jul 15, 2024
1 parent 62ff4f2 commit cc9a26d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/api/v1/middlewares/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cc9a26d

Please sign in to comment.