Essential data now passable from server to client regarding channels
This commit is contained in:
parent
972d79d44b
commit
a217c64666
@ -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
|
||||
|
@ -35,3 +35,12 @@ pub struct Channel {
|
||||
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
|
||||
}
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user