From f73aa32549743b2967160d38c1622199c41524a4 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 29 Apr 2025 15:19:36 +0200 Subject: aaaaaaa --- logic/src/admin/user.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 logic/src/admin/user.rs (limited to 'logic/src/admin/user.rs') diff --git a/logic/src/admin/user.rs b/logic/src/admin/user.rs new file mode 100644 index 0000000..2d788cb --- /dev/null +++ b/logic/src/admin/user.rs @@ -0,0 +1,17 @@ +/* + 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) 2025 metamuffin +*/ + +use crate::session::AdminSession; +use anyhow::Result; +use jellybase::database::Database; +use jellycommon::api::ApiAdminUsersResponse; + +pub fn admin_users(db: &Database, _session: &AdminSession) -> Result { + // TODO dont return useless info like passwords + Ok(ApiAdminUsersResponse { + users: db.list_users()?, + }) +} -- cgit v1.2.3-70-g09d2