forked from Ruderverein-Donau-Linz/rowt
fix ci; clean code
This commit is contained in:
parent
94a9d285be
commit
f0c6bdac14
@ -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" (
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user