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 rand_utils;
|
||||||
mod users;
|
mod users;
|
||||||
mod channels;
|
mod channels;
|
||||||
|
mod err;
|
||||||
use invites::*;
|
use invites::*;
|
||||||
use channels::*;
|
use channels::*;
|
||||||
use users::*;
|
use users::*;
|
||||||
@ -38,7 +39,7 @@ pub fn rocket() -> rocket::Rocket {
|
|||||||
generate_invite, use_invite
|
generate_invite, use_invite
|
||||||
])
|
])
|
||||||
.mount("/channels", routes![
|
.mount("/channels", routes![
|
||||||
get_voice_channels
|
get_voice_channels, insert_new_channel, get_text_chanels
|
||||||
])
|
])
|
||||||
.mount("/users", routes![
|
.mount("/users", routes![
|
||||||
remove_user, get_user_list
|
remove_user, get_user_list
|
||||||
|
@ -35,3 +35,12 @@ pub struct Channel {
|
|||||||
pub limit: i32, // <= 0 means there is no limit
|
pub limit: i32, // <= 0 means there is no limit
|
||||||
pub type_: i32, // 1 for voice 2 for text
|
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,
|
status: i32,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize, Deserialize)]
|
||||||
|
pub struct ChannelIndexed {
|
||||||
|
pub name: String,
|
||||||
|
pub ctype: i32,
|
||||||
|
}
|
||||||
#[derive(Serialize, Deserialize, Debug)]
|
#[derive(Serialize, Deserialize, Debug)]
|
||||||
pub struct VoiceChannel {
|
pub struct VoiceChannel {
|
||||||
pub id: i32,
|
pub id: i32,
|
||||||
|
Loading…
Reference in New Issue
Block a user