Skip to content

Commit

Permalink
Fixed json context relative path bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Andras Mocsary committed Jun 3, 2019
1 parent d55aa9b commit b86fc1f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tera_design"
version = "0.1.2"
version = "0.1.3"
authors = ["Andras Mocsary <nobody@reedwolf.com>"]
edition = "2018"

Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ fn main() -> std::io::Result<()> {
env_logger::init();

HttpServer::new(|| {
let tera = compile_templates!("./templates/**/*");
let tera = compile_templates!("templates/**/*");

App::new()
.data(std::sync::Mutex::new(tera))
Expand All @@ -79,7 +79,7 @@ fn main() -> std::io::Result<()> {
}

fn get_context(file: &str) -> Result<serde_json::Value, Error> {
let mut fl = concat!(env!("CARGO_MANIFEST_DIR"), "/templates/").to_owned();
let mut fl = "templates/".to_owned();
fl.push_str(file);
let ctx_file = if let Some(file_ext) = std::path::Path::new(&fl)
.extension()
Expand Down
Binary file removed tera_design_0-1-2.zip
Binary file not shown.

0 comments on commit b86fc1f

Please sign in to comment.