diff options
author | tylerm <tylerm@tylerm.dev> | 2023-08-22 04:16:31 +0000 |
---|---|---|
committer | tylerm <tylerm@tylerm.dev> | 2023-08-22 04:16:31 +0000 |
commit | edbbdf72c78536c48357a86181bbf6897fc52074 (patch) | |
tree | 91d91e9dfb77ae3b7d75f4348c01bba59d0f13dc /src/public/docs.rs | |
parent | allow port env (diff) | |
parent | finish dms (diff) | |
download | xssbook-edbbdf72c78536c48357a86181bbf6897fc52074.tar.gz xssbook-edbbdf72c78536c48357a86181bbf6897fc52074.tar.bz2 xssbook-edbbdf72c78536c48357a86181bbf6897fc52074.zip |
Merge pull request 'dms are cool' (#1) from dev into main
Reviewed-on: https://g.tylerm.dev/tylerm/xssbook/pulls/1
Diffstat (limited to '')
-rw-r--r-- | src/public/docs.rs | 14 |
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, |