upgrade sqlx to 0.7 Fixes #76 restructure registrations
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
use std::ops::DerefMut;
|
||||
|
||||
use chrono::{Datelike, NaiveDateTime, Utc};
|
||||
use rocket::FromForm;
|
||||
use serde::Serialize;
|
||||
@ -160,7 +162,7 @@ impl Logbook {
|
||||
",
|
||||
id
|
||||
)
|
||||
.fetch_one(db)
|
||||
.fetch_one(db.deref_mut())
|
||||
.await
|
||||
.ok()
|
||||
}
|
||||
@ -289,7 +291,7 @@ ORDER BY departure DESC
|
||||
log.comments,
|
||||
log.logtype
|
||||
)
|
||||
.fetch_one(&mut tx)
|
||||
.fetch_one(tx.deref_mut())
|
||||
.await.unwrap().id;
|
||||
|
||||
let logbook = Logbook::find_by_id_tx(&mut tx, inserted_row as i32)
|
||||
@ -363,7 +365,7 @@ ORDER BY departure DESC
|
||||
log.comments,
|
||||
log.logtype
|
||||
)
|
||||
.fetch_one(&mut tx)
|
||||
.fetch_one(tx.deref_mut())
|
||||
.await.unwrap();
|
||||
|
||||
for rower in &log.rowers {
|
||||
@ -398,7 +400,7 @@ ORDER BY departure DESC
|
||||
|
||||
async fn remove_rowers(&self, db: &mut Transaction<'_, Sqlite>) {
|
||||
sqlx::query!("DELETE FROM rower WHERE logbook_id=?", self.id)
|
||||
.execute(db)
|
||||
.execute(db.deref_mut())
|
||||
.await
|
||||
.unwrap();
|
||||
}
|
||||
@ -495,7 +497,7 @@ ORDER BY departure DESC
|
||||
log.arrival,
|
||||
self.id
|
||||
)
|
||||
.execute(db)
|
||||
.execute(db.deref_mut())
|
||||
.await.unwrap(); //TODO: fixme
|
||||
|
||||
Ok(())
|
||||
|
Reference in New Issue
Block a user