add room logging

This commit is contained in:
not-nullptr 2024-03-19 18:24:37 +00:00
parent db626df718
commit 4edc443fdb

View file

@ -44,7 +44,6 @@ export async function POST({ request, getClientAddress }) {
const user = await useAuth(token); const user = await useAuth(token);
console.log(user); console.log(user);
if (!user) return new Response(null, { status: 401 }); if (!user) return new Response(null, { status: 401 });
console.log(body, getClientAddress());
const room = RoomManager.createRoom({ const room = RoomManager.createRoom({
name: body.name, name: body.name,
description: parsedDescription[0] || "", description: parsedDescription[0] || "",
@ -62,5 +61,6 @@ export async function POST({ request, getClientAddress }) {
host: user, host: user,
hasPassword: body.hasPassword || false, hasPassword: body.hasPassword || false,
}); });
console.log("Room added:", JSON.stringify(room, null, 2));
return json(room.toJSON()); return json(room.toJSON());
} }