fix stupid mistakes in config checks
This commit is contained in:
parent
544bacff2a
commit
46fbbee459
|
@ -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()))
|
||||
}
|
||||
|
||||
|
|
|
@ -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()))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue