aboutsummaryrefslogtreecommitdiff
path: root/src/database
diff options
context:
space:
mode:
Diffstat (limited to 'src/database')
-rw-r--r--src/database/types.rs2
1 files changed, 2 insertions, 0 deletions
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<crate::database::Database>) -> Info {
Info{
name: String::from("Testing"),
+ version: option_env!("CARGO_PKG_VERSION").unwrap(),
users: db.get_user_count(),
}
}