show notification to vorstand if boat entry with 'externes boot' or on multiple days is entered
Some checks failed
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled

This commit is contained in:
2024-04-15 22:03:20 +02:00
parent 8315a27ea8
commit 219b80377d
4 changed files with 69 additions and 4 deletions

View File

@ -370,6 +370,13 @@ ORDER BY last_access DESC
}
pub async fn all_with_role(db: &SqlitePool, role: &Role) -> Vec<Self> {
let mut tx = db.begin().await.unwrap();
let ret = Self::all_with_role_tx(&mut tx, role).await;
tx.commit().await.unwrap();
ret
}
pub async fn all_with_role_tx(db: &mut Transaction<'_, Sqlite>, role: &Role) -> Vec<Self> {
sqlx::query_as!(
Self,
"
@ -380,7 +387,7 @@ WHERE ur.role_id = ? AND deleted = 0
ORDER BY name;
", role.id
)
.fetch_all(db)
.fetch_all(db.deref_mut())
.await
.unwrap()
}