fix ci; clean code

This commit is contained in:
philipp 2023-08-05 16:29:58 +02:00
parent 94a9d285be
commit f0c6bdac14
2 changed files with 2 additions and 7 deletions

View File

@ -34,7 +34,7 @@ CREATE TABLE IF NOT EXISTS "planned_event" (
"name" text NOT NULL,
"planned_amount_cox" INTEGER unsigned NOT NULL,
"trip_details_id" INTEGER NOT NULL REFERENCES TRIP_details(id) ON DELETE CASCADE,
"created_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
"created_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE IF NOT EXISTS "trip" (

View File

@ -206,12 +206,7 @@ async fn home(
}
#[get("/<logbook_id>/delete")]
async fn delete(
db: &State<SqlitePool>,
flash: Option<FlashMessage<'_>>,
logbook_id: i32,
_adminuser: AdminUser,
) -> Flash<Redirect> {
async fn delete(db: &State<SqlitePool>, logbook_id: i32, _adminuser: AdminUser) -> Flash<Redirect> {
let logbook = Logbook::find_by_id(db, logbook_id).await;
if let Some(logbook) = logbook {
logbook.delete(db).await;