feat(cli): add shumai-cli and token authentication

This commit is contained in:
yiling
2026-06-21 12:35:12 +08:00
parent e33cbdb37c
commit 90ef063d43
40 changed files with 3609 additions and 18 deletions
+5
View File
@@ -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,
})