Reapply "Add missing admin action files and navigation links"

This reverts commit 4d515bc400.
This commit is contained in:
Simo committed 2026-07-11 20:52:56 +02:00
1 parent 96ed768f14
commit 5b4228261a
338 files changed
+28143 -5948

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
import { notFound } from 'next/navigation'
import { prisma } from '@/lib/prisma'
export async function loadRoom(id: string) {
const roomId = parseInt(id, 10)
if (Number.isNaN(roomId)) notFound()
const room = await prisma.room.findUnique({
where: { id: roomId },
include: { owner: { select: { id: true, username: true, look: true } } },
})
if (!room) notFound()
return room
}