summaryrefslogtreecommitdiff
path: root/src/public/docs.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/public/docs.rs')
-rw-r--r--src/public/docs.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/public/docs.rs b/src/public/docs.rs
index 397e696..976638b 100644
--- a/src/public/docs.rs
+++ b/src/public/docs.rs
@@ -3,24 +3,28 @@ use lazy_static::lazy_static;
use tokio::sync::Mutex;
use crate::{
- api::{admin, auth, posts, users},
+ api::{admin, auth, posts, users, chat},
types::http::ResponseCode,
};
use super::console::beautify;
pub enum EndpointMethod {
+ Get,
Post,
Put,
Patch,
+ Delete
}
impl ToString for EndpointMethod {
fn to_string(&self) -> String {
match self {
+ Self::Get => "GET".to_owned(),
Self::Post => "POST".to_owned(),
Self::Put => "PUT".to_owned(),
Self::Patch => "PATCH".to_owned(),
+ Self::Delete => "DELETE".to_owned(),
}
}
}
@@ -139,6 +143,14 @@ pub async fn init() {
users::USERS_FOLLOW,
users::USERS_FOLLOW_STATUS,
users::USERS_FRIENDS,
+ chat::CHAT_LIST,
+ chat::CHAT_CREATE,
+ chat::CHAT_ADD,
+ chat::CHAT_LEAVE,
+ chat::CHAT_SEND,
+ chat::CHAT_LOAD,
+ chat::CHAT_TYPING,
+ chat::CHAT_CONNECT,
admin::ADMIN_AUTH,
admin::ADMIN_QUERY,
admin::ADMIN_POSTS,