aboutsummaryrefslogtreecommitdiff
path: root/logic/src/admin/user.rs
blob: 3ec3852ed5c7637942ea950393708ae557fbf3ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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 jellycommon::api::ApiAdminUsersResponse;
use jellydb::Database;

pub fn admin_users(db: &Database, _session: &AdminSession) -> Result<ApiAdminUsersResponse> {
    // TODO dont return useless info like passwords
    Ok(ApiAdminUsersResponse {
        users: db.list_users()?,
    })
}