This commit is contained in:
JMARyA 2024-08-15 16:45:04 +02:00
parent 31649314a5
commit 05d3848602
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
8 changed files with 102 additions and 91 deletions

View file

@ -83,7 +83,7 @@ pub async fn passwd_route(passwd: Json<PasswdData>, mut u: User) -> FallibleApiR
pub async fn users_route(u: User) -> FallibleApiResponse {
check_admin!(u);
let users: Vec<_> = to_api(&User::find(doc! {}, None).await.unwrap()).await;
let users: Vec<_> = to_api(&User::find_all().await.unwrap()).await;
Ok(json!({"users": users}))
}