diff options
author | metamuffin <metamuffin@disroot.org> | 2025-04-29 15:19:36 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-04-29 15:19:36 +0200 |
commit | f73aa32549743b2967160d38c1622199c41524a4 (patch) | |
tree | 0fa290fbf9b14d7bfd3803f8cc4618c6c9829330 /logic/src/admin/user.rs | |
parent | f62c7f2a8cc143454779dc99334ca9fc80ddabd5 (diff) | |
download | jellything-f73aa32549743b2967160d38c1622199c41524a4.tar jellything-f73aa32549743b2967160d38c1622199c41524a4.tar.bz2 jellything-f73aa32549743b2967160d38c1622199c41524a4.tar.zst |
aaaaaaa
Diffstat (limited to 'logic/src/admin/user.rs')
-rw-r--r-- | logic/src/admin/user.rs | 17 |
1 files changed, 17 insertions, 0 deletions
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 <metamuffin.org> +*/ + +use crate::session::AdminSession; +use anyhow::Result; +use jellybase::database::Database; +use jellycommon::api::ApiAdminUsersResponse; + +pub fn admin_users(db: &Database, _session: &AdminSession) -> Result<ApiAdminUsersResponse> { + // TODO dont return useless info like passwords + Ok(ApiAdminUsersResponse { + users: db.list_users()?, + }) +} |