Finish implementing all routes.

This commit is contained in:
Paul Makles
2020-02-08 15:03:40 +00:00
parent 331d636f49
commit d5d14305d0
5 changed files with 205 additions and 7 deletions

View File

@@ -4,7 +4,10 @@ use serde::{ Deserialize, Serialize };
pub struct Channel {
#[serde(rename = "_id")]
pub id: String,
#[serde(rename = "type")]
pub channel_type: u8,
pub last_message: Option<String>,
// for Direct Messages
pub recipients: Option<Vec<String>>,

View File

@@ -1,8 +1,13 @@
use serde::{ Deserialize, Serialize };
use bson::{ UtcDateTime };
#[derive(Serialize, Deserialize, Debug)]
pub struct Message {
#[serde(rename = "_id")]
pub id: String,
pub id: String,
pub channel: String,
pub author: String,
pub content: String,
pub edited: Option<UtcDateTime>,
}