fix stupid mistakes in config checks
This commit is contained in:
parent
86f6958a02
commit
d277fd451e
|
@ -17,7 +17,7 @@ pub async fn delete(state: SharedState, body: DeleteFunctionPayload) -> Result<B
|
||||||
return Ok(Box::new(res));
|
return Ok(Box::new(res));
|
||||||
}
|
}
|
||||||
|
|
||||||
if state.config.api.delete {
|
if (!state.config.api.delete) || (!state.config.api.enabled) {
|
||||||
return Ok(Box::new(function_disabled_err()))
|
return Ok(Box::new(function_disabled_err()))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ pub async fn get_all(state: SharedState) -> Result<Box<dyn Reply>, Rejection> {
|
||||||
return Ok(Box::new(res))
|
return Ok(Box::new(res))
|
||||||
}
|
}
|
||||||
|
|
||||||
if ! state.config.api.get_all {
|
if (!state.config.api.get_all) || (!state.config.api.enabled) {
|
||||||
return Ok(Box::new(function_disabled_err()))
|
return Ok(Box::new(function_disabled_err()))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue