admin: added list of users

This commit is contained in:
Philippe Loctaux 2023-04-16 22:00:29 +02:00
parent e3bda01eca
commit 5153d057b0
13 changed files with 313 additions and 3 deletions

View file

@ -108,6 +108,14 @@ impl User {
.map(Self::from))
}
pub async fn get_all(conn: impl SqliteExecutor<'_>) -> Result<Vec<Self>, Error> {
Ok(DatabaseUsers::get_all(conn)
.await?
.into_iter()
.map(Self::from)
.collect::<Vec<_>>())
}
pub async fn set_username(
&self,
conn: impl SqliteExecutor<'_>,