hosts:get error parity

This commit is contained in:
c0repwn3r 2023-07-30 14:39:52 -04:00
parent 407deb1796
commit 1afbab3a41
Signed by: core
GPG Key ID: FDBF740DADDCEECF
2 changed files with 3 additions and 4 deletions

View File

@ -31,7 +31,6 @@ base64-serde = "0.7"
dnapi-rs = { version = "0.1", path = "../dnapi-rs" } dnapi-rs = { version = "0.1", path = "../dnapi-rs" }
serde_yaml = "0.9" serde_yaml = "0.9"
nebula-ffi = { version = "0.1", path = "../nebula-ffi", optional = true } nebula-ffi = { version = "0.1", path = "../nebula-ffi", optional = true }
[package.metadata.deb] [package.metadata.deb]
maintainer = "c0repwn3r <core@e3t.cc>" maintainer = "c0repwn3r <core@e3t.cc>"
copyright = "e3team <admin@e3t.cc>" copyright = "e3team <admin@e3t.cc>"

View File

@ -1002,11 +1002,11 @@ pub async fn get_host(id: Path<String>, req_info: HttpRequest, db: Data<AppState
let host = match host { let host = match host {
Some(h) => h, Some(h) => h,
None => { None => {
return HttpResponse::Unauthorized().json(APIErrorsResponse { return HttpResponse::NotFound().json(APIErrorsResponse {
errors: vec![APIError { errors: vec![APIError {
code: "ERR_UNAUTHORIZED".to_string(), code: "ERR_NOT_FOUND".to_string(),
message: message:
"This resource does not exist or you do not have permission to access it." "resource not found"
.to_string(), .to_string(),
path: None, path: None,
}], }],