feat(auth): enhance user schema with role and ban features

This commit is contained in:
2025-11-17 04:28:50 +08:00
parent 86595c7639
commit 68d5c596b4
3 changed files with 26 additions and 12 deletions

View File

@@ -46,10 +46,23 @@ app.use(
app.on(['POST', 'GET'], '/api/auth/*', (c) => auth.handler(c.req.raw))
app.get('/', (c) => {
return c.json({
const user = c.get('user')
const session = c.get('session')
const payload = {
platform: 'Helios CSMS',
message: 'ok',
})
}
if (user) {
Object.assign(payload, { user })
}
if (session) {
Object.assign(payload, { session })
}
return c.json(payload)
})
app.get(