cleanup text response code

master
neri 1 year ago
parent 48574b1ec3
commit 78ef78f342

@ -141,8 +141,9 @@ async fn build_text_response(path: &Path) -> Result<HttpResponse, Error> {
} else {
TEXT_VIEW_HTML.replace("{text}", &encoded)
};
let response = HttpResponse::Ok().content_type("text/html").body(html);
Ok(response)
Ok(HttpResponse::Ok()
.content_type(TEXT_HTML.to_string())
.body(html))
}
fn build_file_response(

Loading…
Cancel
Save