aboutsummaryrefslogtreecommitdiff
path: root/server/src/routes/admin/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/routes/admin/mod.rs')
-rw-r--r--server/src/routes/admin/mod.rs29
1 files changed, 29 insertions, 0 deletions
diff --git a/server/src/routes/admin/mod.rs b/server/src/routes/admin/mod.rs
new file mode 100644
index 0000000..6119b74
--- /dev/null
+++ b/server/src/routes/admin/mod.rs
@@ -0,0 +1,29 @@
+/*
+ This file is part of jellything (https://codeberg.org/metamuffin/jellything)
+ which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
+ Copyright (C) 2026 metamuffin <metamuffin.org>
+*/
+
+pub mod import;
+pub mod log;
+pub mod users;
+
+use super::error::MyResult;
+use crate::request_info::RequestInfo;
+use jellyui::components::admin::AdminDashboard;
+use rocket::{get, response::content::RawHtml};
+
+#[get("/admin/dashboard")]
+pub async fn r_admin_dashboard(ri: RequestInfo<'_>) -> MyResult<RawHtml<String>> {
+ ri.require_admin()?;
+
+ // let mut db_debug = String::new();
+ // ri.state.database.transaction(&mut |txn| {
+ // db_debug = txn.debug_info()?;
+ // Ok(())
+ // })?;
+
+ Ok(ri.respond_ui(&AdminDashboard {
+ ri: &ri.render_info(),
+ }))
+}