Essential data now passable from server to client regarding channels

This commit is contained in:
shockrah committed 2020-03-31 17:15:01 -07:00
1 parent 972d79d44b
commit a217c64666
3 files changed
+16 -1

No files matched your search

+2 -1
View File
@@ -24,6 +24,7 @@ mod payload;
mod rand_utils;
mod users;
mod channels;
mod err;
use invites::*;
use channels::*;
use users::*;
@@ -38,7 +39,7 @@ pub fn rocket() -> rocket::Rocket {
generate_invite, use_invite
])
.mount("/channels", routes![
get_voice_channels
get_voice_channels, insert_new_channel, get_text_chanels
])
.mount("/users", routes![
remove_user, get_user_list
+9
View File
@@ -34,4 +34,13 @@ pub struct Channel {
pub permissions: i32,
pub limit: i32, // <= 0 means there is no limit
pub type_: i32, // 1 for voice 2 for text
}
#[derive(Insertable)]
#[table_name = "channels"]
pub struct InsertableChannel {
pub name: String,
pub permissions: i32,
pub limit: i32, // <= 0 means there is no limit
pub type_: i32, // 1 for voice 2 for text
}
+5
View File
@@ -22,6 +22,11 @@ pub struct OnlineUser {
status: i32,
}
#[derive(Serialize, Deserialize)]
pub struct ChannelIndexed {
pub name: String,
pub ctype: i32,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct VoiceChannel {
pub id: i32,