clippy
This commit is contained in:
@@ -902,7 +902,7 @@ impl crud::Toggle for StateUpdate {
|
|||||||
id: Self::Id,
|
id: Self::Id,
|
||||||
value: bool,
|
value: bool,
|
||||||
) -> Result<(), crate::Error> {
|
) -> Result<(), crate::Error> {
|
||||||
Todo::update(&ctx, &pool, filter, id, UpdateElement::State(value.into())).await?;
|
Todo::update(ctx, pool, filter, id, UpdateElement::State(value.into())).await?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -980,7 +980,7 @@ impl route::ToggleHtmx for StateUpdate {
|
|||||||
(trip_id, todo_id): (Uuid, Uuid),
|
(trip_id, todo_id): (Uuid, Uuid),
|
||||||
value: bool,
|
value: bool,
|
||||||
) -> Result<Response<BoxBody>, crate::Error> {
|
) -> Result<Response<BoxBody>, crate::Error> {
|
||||||
let todo_item = Todo::find(&ctx, &state.database_pool, Filter { trip_id }, Id(todo_id))
|
let todo_item = Todo::find(ctx, &state.database_pool, Filter { trip_id }, Id(todo_id))
|
||||||
.await?
|
.await?
|
||||||
.ok_or_else(|| {
|
.ok_or_else(|| {
|
||||||
crate::Error::Request(RequestError::NotFound {
|
crate::Error::Request(RequestError::NotFound {
|
||||||
|
|||||||
Reference in New Issue
Block a user