send scheckbuch people mail after using all trips
All checks were successful
CI/CD Pipeline / test (push) Successful in 12m7s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped

This commit is contained in:
2024-09-11 23:52:16 +02:00
parent 8408148ead
commit 1225aeac94
5 changed files with 165 additions and 29 deletions

View File

@ -13,6 +13,13 @@ pub struct Rower {
impl Rower {
pub async fn for_log(db: &SqlitePool, log: &Logbook) -> Vec<User> {
let mut tx = db.begin().await.unwrap();
let ret = Self::for_log_tx(&mut tx, log).await;
tx.commit().await.unwrap();
ret
}
pub async fn for_log_tx(db: &mut Transaction<'_, Sqlite>, log: &Logbook) -> Vec<User> {
sqlx::query_as!(
User,
"
@ -22,7 +29,7 @@ WHERE id in (SELECT rower_id FROM rower WHERE logbook_id=?)
",
log.id
)
.fetch_all(db)
.fetch_all(db.deref_mut())
.await
.unwrap()
}