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

+21
View File
@@ -0,0 +1,21 @@
import { prisma } from '../../utils/db'
import { getMemberCount, getStreamCount } from '../../utils/runtimeRooms'
export default defineEventHandler(async (event) => {
const roomId = getRouterParam(event, 'roomId')
if (!roomId) {
throw createError({ statusCode: 400, statusMessage: 'Room id required' })
}
const room = await prisma.room.findUnique({ where: { id: roomId } })
if (!room) {
throw createError({ statusCode: 404, statusMessage: 'Room not found' })
}
return {
id: room.id,
name: room.name,
memberCount: getMemberCount(room.id),
streamCount: getStreamCount(room.id),
}
})