admin dashboard: apps, users, roles, logins in the last 24 hours

This commit is contained in:
Philippe Loctaux 2023-05-08 19:43:44 +02:00
parent 264eee9044
commit a05646a19b
8 changed files with 217 additions and 1 deletions

View file

@ -17,6 +17,13 @@ pub struct AuthorizationCodes {
}
impl AuthorizationCodes {
pub async fn get_all(conn: impl SqliteExecutor<'_>) -> Result<Vec<Self>, Error> {
sqlx::query_file_as!(Self, "queries/authorization_codes/get_all.sql")
.fetch_all(conn)
.await
.map_err(handle_error)
}
pub async fn insert(
conn: impl SqliteExecutor<'_>,
code: &str,