Add PostgreSQL and Redis integration for users and sessions Implement password and WebAuthn passkey login flows Add Docker stack, super-admin seeding, and protected routes
11 lines
247 B
TypeScript
11 lines
247 B
TypeScript
import { requireRole } from '../../utils/auth'
|
|
import { listUsers } from '../../utils/user-repository'
|
|
|
|
export default defineEventHandler(async (event) => {
|
|
await requireRole(event, 'super_admin')
|
|
|
|
return {
|
|
users: await listUsers()
|
|
}
|
|
})
|