feat(auth): enhance user schema with role and ban features
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user