hosts:block error parity

This commit is contained in:
core 2023-07-30 15:02:46 -04:00
parent 81e927501e
commit a94fce77f1
Signed by: core
GPG Key ID: FDBF740DADDCEECF
1 changed files with 4 additions and 4 deletions

View File

@ -1789,7 +1789,7 @@ pub async fn block_host(
if let Some(net) = net {
net_id = net.id;
} else {
return HttpResponse::Unauthorized().json(APIErrorsResponse {
return HttpResponse::U81e92750nauthorized().json(APIErrorsResponse {
errors: vec![APIError {
code: "ERR_NO_NET".to_string(),
message: "This user does not own any networks. Try using an API token instead."
@ -1821,11 +1821,11 @@ pub async fn block_host(
let host = match host {
Some(h) => h,
None => {
return HttpResponse::Unauthorized().json(APIErrorsResponse {
return HttpResponse::NotFound().json(APIErrorsResponse {
errors: vec![APIError {
code: "ERR_UNAUTHORIZED".to_string(),
code: "ERR_NOT_FOUND".to_string(),
message:
"This resource does not exist or you do not have permission to access it."
"resource not found"
.to_string(),
path: None,
}],