This commit is contained in:
2023-09-17 19:00:22 +02:00
parent f662f4fb12
commit 4f9a68fdf0
4 changed files with 125 additions and 54 deletions

View File

@@ -13,10 +13,7 @@ use std::{fmt, time::Duration};
use tower::{timeout::TimeoutLayer, ServiceBuilder};
use crate::{
components::{
self,
route::{Router as _, Toggle},
},
components::{self, route::Router as _},
AppState, Error, RequestError, TopLevelPage,
};
@@ -168,11 +165,7 @@ pub fn router(state: AppState) -> Router {
"/:id/todo/:id/edit/cancel",
post(components::trips::todos::trip_todo_edit_cancel),
)
.nest(
"/:id/todo/",
components::trips::todos::Todo::get()
.merge(<components::trips::todos::StateUpdate as Toggle>::router()),
),
.nest("/:id/todo/", components::trips::todos::Todo::router()),
)
.nest(
(&TopLevelPage::Inventory.path()).into(),

View File

@@ -441,7 +441,7 @@ pub async fn trip(
&ctx,
&state.database_pool,
&todos::Filter { trip_id: id },
delete_todo,
components::trips::todos::Id(delete_todo),
)
.await?;