File size: 387 Bytes
d092f57 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import { getRoom, listRooms } from "../../lib/cache"
import { NextApiRequest, NextApiResponse } from "next"
export default async function debug(_: NextApiRequest, res: NextApiResponse) {
if (process.env.NODE_ENV === "production") {
return res.status(403).end()
}
res.json(
await Promise.all(
(await listRooms()).map(async (room) => await getRoom(room))
)
)
}
|