Fix 'force' paramter in prine query

This commit is contained in:
asonix 2024-06-09 11:05:13 -05:00
parent dd01548309
commit 77c1c90572

View file

@ -1342,7 +1342,7 @@ struct PruneResponse {
#[derive(Debug, serde::Deserialize)] #[derive(Debug, serde::Deserialize)]
struct PruneQuery { struct PruneQuery {
force: bool, force: Serde<bool>,
} }
#[tracing::instrument(name = "Prune missing identifiers", skip(state))] #[tracing::instrument(name = "Prune missing identifiers", skip(state))]
@ -1370,7 +1370,7 @@ async fn prune_missing<S>(
let started = state.repo.get("prune-missing-started").await?.is_some(); let started = state.repo.get("prune-missing-started").await?.is_some();
if !started || query.is_some_and(|q| q.force) { if !started || query.is_some_and(|q| *q.force) {
queue::prune_missing(&state.repo).await?; queue::prune_missing(&state.repo).await?;
} }