mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 13:36:59 +00:00
Re-do guards, streamline requests.
This commit is contained in:
12
src/database/channel.rs
Normal file
12
src/database/channel.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
use serde::{ Deserialize, Serialize };
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct Channel {
|
||||
#[serde(rename = "_id")]
|
||||
pub id: String,
|
||||
pub channel_type: u8,
|
||||
|
||||
// for Direct Messages
|
||||
pub recipients: Option<Vec<String>>,
|
||||
pub active: Option<bool>,
|
||||
}
|
||||
8
src/database/message.rs
Normal file
8
src/database/message.rs
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
use serde::{ Deserialize, Serialize };
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct Message {
|
||||
#[serde(rename = "_id")]
|
||||
pub id: String,
|
||||
}
|
||||
@@ -24,4 +24,6 @@ pub fn get_collection(collection: &str) -> Collection {
|
||||
get_db().collection(collection)
|
||||
}
|
||||
|
||||
pub mod user;
|
||||
pub mod user;
|
||||
pub mod channel;
|
||||
pub mod message;
|
||||
|
||||
Reference in New Issue
Block a user