mirror of
https://git.dirksys.ovh/dirk/bankserver.git
synced 2025-12-20 02:59:20 +01:00
fix interop list users endpoint
This commit is contained in:
parent
b18a6cbb97
commit
ac54d2fdc9
@ -139,17 +139,16 @@ pub async fn list_interop_users(
|
||||
};
|
||||
users.names.as_slice()
|
||||
}
|
||||
None => {
|
||||
match fetch_users(interop).await {
|
||||
Ok(names) => {
|
||||
*guard = Some((InteropUsers { names }, Instant::now()));
|
||||
}
|
||||
Err(err) => {
|
||||
let _ = Error::from(err);
|
||||
}
|
||||
};
|
||||
guard.as_ref().unwrap().0.names.as_slice()
|
||||
}
|
||||
None => match fetch_users(interop).await {
|
||||
Ok(names) => {
|
||||
*guard = Some((InteropUsers { names }, Instant::now()));
|
||||
guard.as_ref().unwrap().0.names.as_slice()
|
||||
}
|
||||
Err(err) => {
|
||||
let _ = Error::from(err);
|
||||
&[]
|
||||
}
|
||||
},
|
||||
};
|
||||
Ok(Json(json!(names)))
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user