mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-25 07:48:22 +00:00
feat(cli): add shumai-cli and token authentication
This commit is contained in:
@@ -10,6 +10,11 @@ export const authMiddleware = createMiddleware<{
|
||||
user: User
|
||||
}
|
||||
}>(async (c, next) => {
|
||||
if (c.get('user')) {
|
||||
await next()
|
||||
return
|
||||
}
|
||||
|
||||
const session = await auth.api.getSession({
|
||||
headers: c.req.raw.headers,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user