Add Status Codes to Error Pages
This commit is contained in:
parent
0f88936909
commit
cef3266186
@ -41,7 +41,7 @@ async fn render(sub_name: String, sort: Option<String>, ends: (Option<String>, O
|
||||
}
|
||||
.render()
|
||||
.unwrap();
|
||||
Ok(HttpResponse::Ok().content_type("text/html").body(s))
|
||||
Ok(HttpResponse::Ok().status(actix_web::http::StatusCode::NOT_FOUND).content_type("text/html").body(s))
|
||||
} else {
|
||||
let items = items_result.unwrap();
|
||||
|
||||
|
@ -28,7 +28,7 @@ async fn render(id: String, sort: String) -> Result<HttpResponse> {
|
||||
}
|
||||
.render()
|
||||
.unwrap();
|
||||
Ok(HttpResponse::Ok().content_type("text/html").body(s))
|
||||
Ok(HttpResponse::Ok().status(actix_web::http::StatusCode::NOT_FOUND).content_type("text/html").body(s))
|
||||
} else {
|
||||
let s = PostTemplate {
|
||||
comments: comments.unwrap(),
|
||||
|
@ -46,7 +46,7 @@ pub async fn render(sub_name: String, sort: Option<String>, ends: (Option<String
|
||||
}
|
||||
.render()
|
||||
.unwrap();
|
||||
Ok(HttpResponse::Ok().content_type("text/html").body(s))
|
||||
Ok(HttpResponse::Ok().status(actix_web::http::StatusCode::NOT_FOUND).content_type("text/html").body(s))
|
||||
} else {
|
||||
let mut sub = sub_result.unwrap();
|
||||
let items = items_result.unwrap();
|
||||
|
@ -26,7 +26,7 @@ async fn render(username: String, sort: String) -> Result<HttpResponse> {
|
||||
}
|
||||
.render()
|
||||
.unwrap();
|
||||
Ok(HttpResponse::Ok().content_type("text/html").body(s))
|
||||
Ok(HttpResponse::Ok().status(actix_web::http::StatusCode::NOT_FOUND).content_type("text/html").body(s))
|
||||
} else {
|
||||
let s = UserTemplate {
|
||||
user: user.unwrap(),
|
||||
|
Loading…
Reference in New Issue
Block a user