first commit
CI / Type-check & Build (push) Failing after 5m50s
CI / Build & Push image (push) Skipped

This commit is contained in:
ysj7705 committed 2026-08-12 15:01:43 +09:00
commit 69b647145f
58 files changed
+15796

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
import { prisma } from '../../utils/db'
import { getMemberCount, getStreamCount } from '../../utils/runtimeRooms'
export default defineEventHandler(async () => {
const rooms = await prisma.room.findMany({ orderBy: { createdAt: 'desc' } })
return rooms.map((room) => ({
id: room.id,
name: room.name,
pwdVersion: room.pwdVersion,
createdAt: room.createdAt.toISOString(),
createdBy: room.createdBy,
memberCount: getMemberCount(room.id),
streamCount: getStreamCount(room.id),
}))
})