forked from neri/datatrash
cleanup text response code
This commit is contained in:
parent
48574b1ec3
commit
78ef78f342
|
@ -141,8 +141,9 @@ async fn build_text_response(path: &Path) -> Result<HttpResponse, Error> {
|
||||||
} else {
|
} else {
|
||||||
TEXT_VIEW_HTML.replace("{text}", &encoded)
|
TEXT_VIEW_HTML.replace("{text}", &encoded)
|
||||||
};
|
};
|
||||||
let response = HttpResponse::Ok().content_type("text/html").body(html);
|
Ok(HttpResponse::Ok()
|
||||||
Ok(response)
|
.content_type(TEXT_HTML.to_string())
|
||||||
|
.body(html))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn build_file_response(
|
fn build_file_response(
|
||||||
|
|
Loading…
Reference in New Issue