Files
docker-registry-aio/app/server/api/users/index.get.ts
T
ysj7705andCursor 0fd00bfa37 Add Docker Registry AIO with Nuxt Token Auth and admin UI.
Compose brings up registry:3 plus a Prisma/SQLite Nuxt app for docker login, ACL management, and image browsing with shadcn-vue.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 16:12:12 +09:00

22 lines
448 B
TypeScript

export default defineEventHandler(async (event) => {
await requireAdmin(event)
await ensureBootstrap()
const users = await prisma.user.findMany({
orderBy: { username: 'asc' },
include: { acls: true },
})
return {
users: users.map((u) => ({
id: u.id,
username: u.username,
role: u.role,
active: u.active,
createdAt: u.createdAt,
updatedAt: u.updatedAt,
acls: u.acls,
})),
}
})