first commit
This commit is contained in:
commit
69b647145f
58 files changed
+15796
No files matched your search
@@ -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),
|
||||
}))
|
||||
})
|
||||
Reference in new issue
Block a user