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>
17 lines
448 B
TypeScript
17 lines
448 B
TypeScript
export default defineEventHandler(async (event) => {
|
|
await requireSession(event)
|
|
await ensureBootstrap()
|
|
|
|
const [userCount, repositories] = await Promise.all([
|
|
prisma.user.count(),
|
|
listRepositories().catch(() => [] as string[]),
|
|
])
|
|
|
|
return {
|
|
users: userCount,
|
|
repositories: repositories.length,
|
|
authPublicUrl: process.env.AUTH_PUBLIC_URL || '',
|
|
registryInternalUrl: process.env.REGISTRY_INTERNAL_URL || '',
|
|
}
|
|
})
|