From 2131176edc37761e8c4bd4819e0a9f9156bb7c76 Mon Sep 17 00:00:00 2001 From: curly Date: Wed, 8 Feb 2023 10:11:09 -0700 Subject: TODO and include version in /api --- TODO | 11 ++++++++++- src/database/types.rs | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index a663a34..dbe5966 100644 --- a/TODO +++ b/TODO @@ -6,4 +6,13 @@ Rework Response to be an enum Add Channels Add DM'ing -Federation would be cool \ No newline at end of file +Federation would be cool +Rework message format - sender should just be an id + +Limit get_message_id_list +Add get_message_list + +ACLs +Config + +/api - list functions/routes \ No newline at end of file diff --git a/src/database/types.rs b/src/database/types.rs index 4d2c220..0d89adb 100644 --- a/src/database/types.rs +++ b/src/database/types.rs @@ -88,12 +88,14 @@ impl Message { #[derive(Serialize)] pub struct Info { name: String, + version: &'static str, users: usize, } impl Info { pub fn get(db: std::sync::MutexGuard) -> Info { Info{ name: String::from("Testing"), + version: option_env!("CARGO_PKG_VERSION").unwrap(), users: db.get_user_count(), } } -- cgit v1.2.3