fix stupid mistakes in config checks

This commit is contained in:
blek 2023-12-13 00:55:39 +10:00
parent 7e9d387cc2
commit 605a0f76ff
Signed by: blek
GPG Key ID: 14546221E3595D0C
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ pub async fn delete(state: SharedState, body: DeleteFunctionPayload) -> Result<B
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()))
}

View File

@ -9,7 +9,7 @@ pub async fn get_all(state: SharedState) -> Result<Box<dyn Reply>, Rejection> {
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()))
}