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

+19
View File
@@ -0,0 +1,19 @@
import { prisma } from '../../utils/db'
import { forceCloseRoom } from '../../utils/runtimeRooms'
export default defineEventHandler(async (event) => {
const roomId = getRouterParam(event, 'roomId')
if (!roomId) {
throw createError({ statusCode: 400, statusMessage: 'Room id required' })
}
const existing = await prisma.room.findUnique({ where: { id: roomId } })
if (!existing) {
throw createError({ statusCode: 404, statusMessage: 'Room not found' })
}
forceCloseRoom(roomId, 'Room deleted by admin')
await prisma.room.delete({ where: { id: roomId } })
return { ok: true }
})