fixed submit content type
This commit is contained in:
parent
e56e43651c
commit
c196a882d5
1 changed files with 7 additions and 4 deletions
|
@ -36,10 +36,13 @@ async fn blog() -> impl Responder {
|
||||||
#[get("/blog/submit")]
|
#[get("/blog/submit")]
|
||||||
async fn blog_submit() -> impl Responder {
|
async fn blog_submit() -> impl Responder {
|
||||||
let root_path = config::get_from_env("ROOT_PATH", true);
|
let root_path = config::get_from_env("ROOT_PATH", true);
|
||||||
HttpResponse::Ok().set_header("SameSite", "secure").body(
|
HttpResponse::Ok()
|
||||||
std::fs::read_to_string(root_path + "/html/submit.html")
|
.content_type("text/html")
|
||||||
.unwrap_or_else(|e| panic!("Error, couldn't load submit html file.\n{}", e)),
|
.set_header("SameSite", "secure")
|
||||||
)
|
.body(
|
||||||
|
std::fs::read_to_string(root_path + "/html/submit.html")
|
||||||
|
.unwrap_or_else(|e| panic!("Error, couldn't load submit html file.\n{}", e)),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[get("/blog/id/{post_id}")]
|
#[get("/blog/id/{post_id}")]
|
||||||
|
|
Loading…
Reference in a new issue