socket are working but it's not the right way
This commit is contained in:
@@ -3854,6 +3854,10 @@ var app = (function () {
|
||||
}
|
||||
async function create_room(room_name, room_type) {
|
||||
console.log("in create_room");
|
||||
let form_data = {
|
||||
room_name: room_name,
|
||||
room_type: room_type,
|
||||
};
|
||||
// send the new room
|
||||
const response = await fetch('/api/v2/chat/create', {
|
||||
method: 'POST',
|
||||
@@ -3898,6 +3902,7 @@ var app = (function () {
|
||||
let data = await response.json();
|
||||
console.log(data.message);
|
||||
await get_room_messages();
|
||||
socket$1.emit('join', name);
|
||||
room_name.set(name);
|
||||
layout.set("room");
|
||||
}
|
||||
@@ -7677,7 +7682,7 @@ var app = (function () {
|
||||
if (!formIsValid) return;
|
||||
|
||||
// send the new room
|
||||
const response = await create_room();
|
||||
const response = await create_room(room_name, room_type);
|
||||
|
||||
// go to room
|
||||
if (response.status === 200 && response.message === "successfull room creation") {
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user