ft_transcendence/frontend/static/js/api/chat/channels.js

20 lines
341 B
JavaScript
Raw Normal View History

2023-12-12 04:04:46 -05:00
class Channels {
constructor(client) {
this.client = client;
}
async createChannel(users_id) {
console.log(users_id);
let response = await this.client._post("/api/chat/", {
users_id:users_id
});
let data = await response.json();
if (data == "Channel already exist")
return null;
return data;
}
}
export {Channels}