Skip to content

Commit

Permalink
fix: dir for tnc.html
Browse files Browse the repository at this point in the history
  • Loading branch information
DhananjayPurohit committed Sep 5, 2024
1 parent 7b836e7 commit a5fad6a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion token-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ async fn main() {
endpoints::token::token_init,
endpoints::token::token_verify,
endpoints::token::token_gen,
endpoints::token::token_accept,
])
.register("/", catchers![
not_found,
Expand Down
6 changes: 3 additions & 3 deletions token-server/src/server_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl Default for ServerConfig {
fee: String::from("10000"),
delay: 3600,
connection_string: String::from("postgresql://postgres:postgres@localhost/mercury"),
tnc: fs::read_to_string("../tnc.html").unwrap_or_else(|_| String::from("")),
tnc: fs::read_to_string("tnc.html").unwrap_or_else(|_| String::from("")),
}
}
}
Expand All @@ -44,7 +44,7 @@ impl From<ConfigRs> for ServerConfig {
fee: config.get::<String>("fee").unwrap_or_else(|_| String::new()),
delay: config.get::<u64>("delay").unwrap_or(0),
connection_string: config.get::<String>("connection_string").unwrap_or_else(|_| String::new()),
tnc: fs::read_to_string("../tnc.html").unwrap_or_else(|_| String::from("")),
tnc: fs::read_to_string("tnc.html").unwrap_or_else(|_| String::from("")),
}
}
}
Expand Down Expand Up @@ -77,7 +77,7 @@ impl ServerConfig {
fee: get_env_or_config("fee", "FEE"),
delay: get_env_or_config("delay", "DELAY").parse::<u64>().unwrap(),
connection_string: get_env_or_config("connection_string", "CONNECTION_STRING"),
tnc: fs::read_to_string("../tnc.html").unwrap_or_else(|_| String::from("")),
tnc: fs::read_to_string("tnc.html").unwrap_or_else(|_| String::from("")),
}
}
}
Expand Down

0 comments on commit a5fad6a

Please sign in to comment.