fix: ip ban checks
This commit is contained in:
parent
ff59da57b0
commit
360e822d76
1 changed files with 2 additions and 2 deletions
|
@ -322,7 +322,7 @@ async fn create_request(
|
|||
|
||||
// check for ip ban
|
||||
if !real_ip.is_empty() {
|
||||
if data.check_ip(&real_ip.as_str()).await.is_ok() {
|
||||
if data.check_ip(&real_ip.as_str()).await.unwrap_or(false) {
|
||||
return Err(Json(Error::NotAllowed.into()));
|
||||
}
|
||||
}
|
||||
|
@ -475,7 +475,7 @@ async fn edit_request(
|
|||
|
||||
// check for ip ban
|
||||
if !real_ip.is_empty() {
|
||||
if data.check_ip(&real_ip.as_str()).await.is_ok() {
|
||||
if data.check_ip(&real_ip.as_str()).await.unwrap_or(false) {
|
||||
return Json(Error::NotAllowed.into());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue