protected room working at least
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
response = await create_room(room);
|
||||
|
||||
// go to room
|
||||
if (response.error)
|
||||
if (response.status >= 300)
|
||||
show_error = response.error;
|
||||
else
|
||||
await change_room(response.room);
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
{
|
||||
console.log("inside go_to_room");
|
||||
|
||||
if (room.protection)
|
||||
console.log("room:", room);
|
||||
if (room.protection && !room.allowed)
|
||||
{
|
||||
await current_room.set(room);
|
||||
layout.set("protected");
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
response = await send_password(room);
|
||||
|
||||
// go to room
|
||||
if (response.error)
|
||||
if (response.status >= 300)
|
||||
show_error = response.error;
|
||||
else
|
||||
await change_room(response.room);
|
||||
|
||||
@@ -5,6 +5,7 @@ export interface Room
|
||||
users?: string[];
|
||||
client_name?: string;
|
||||
protection: boolean;
|
||||
allowed?: boolean;
|
||||
}
|
||||
|
||||
export interface FetchResponse
|
||||
|
||||
Reference in New Issue
Block a user