Skip to content
Snippets Groups Projects
Unverified Commit 3aa0c356 authored by Volkor Barbarian Warrior's avatar Volkor Barbarian Warrior
Browse files

oh my lord I need to move it to before it panics..

parent 5c63779f
No related branches found
No related tags found
No related merge requests found
......@@ -53,10 +53,10 @@ async fn index(req: &mut Request, res: &mut Response) {
// build the path we need for the template.
let template_with_host =
"./templates/".to_owned() + headers[HOST].to_str().unwrap_or("localhost:8282");
tracing::debug!("template_with_host: {:?}", template_with_host);
// Now we need to setup the templating engine.
let tpls: Ramhorns = Ramhorns::from_folder(&template_with_host)
.expect("Unable to find template, please place the templates correctly!");
tracing::debug!("template_with_host: {:?}", template_with_host);
let rendered = tpls.get("upload.html").unwrap().render(&"");
// Removed templating for debugging multiple template dirs - I should probably add it back in.
res.render(Text::Html(rendered));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment