From f0c6bdac14eaffa09a944ad2d4da8f01fba7efd9 Mon Sep 17 00:00:00 2001 From: philipp Date: Sat, 5 Aug 2023 16:29:58 +0200 Subject: [PATCH] fix ci; clean code --- migration.sql | 2 +- src/tera/log.rs | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/migration.sql b/migration.sql index 99daf39..5e50687 100644 --- a/migration.sql +++ b/migration.sql @@ -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" ( diff --git a/src/tera/log.rs b/src/tera/log.rs index b893318..9d65dd7 100644 --- a/src/tera/log.rs +++ b/src/tera/log.rs @@ -206,12 +206,7 @@ async fn home( } #[get("//delete")] -async fn delete( - db: &State, - flash: Option>, - logbook_id: i32, - _adminuser: AdminUser, -) -> Flash { +async fn delete(db: &State, logbook_id: i32, _adminuser: AdminUser) -> Flash { let logbook = Logbook::find_by_id(db, logbook_id).await; if let Some(logbook) = logbook { logbook.delete(db).await;