added global room creation in frontend and fixed global rooms

This commit is contained in:
2025-12-18 08:06:20 +01:00
parent 4d939f611d
commit 2572db7a24
6 changed files with 115 additions and 34 deletions

View File

@@ -5,10 +5,10 @@ export function fetchRooms(userUuid: string) {
return apiFetch<Room[]>(`/rooms/${userUuid}`)
}
export function createRoom(name: string) {
export function createRoom(name: string, global: boolean) {
return apiFetch<Room>('/rooms', {
method: 'POST',
body: JSON.stringify({ name }),
body: JSON.stringify({ name, global }),
})
}