Advance don't merge

This commit is contained in:
2023-12-12 10:04:46 +01:00
parent 9b523f082f
commit bc892bc157
7 changed files with 48 additions and 51 deletions

View File

@ -0,0 +1,9 @@
class Channel {
constructor(id, members, messages) {
this.id = id;
this.members = members;
this.messages = messages;
}
}
export {Channel}

View File

@ -0,0 +1,19 @@
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}