Fixed prod builds

This commit is contained in:
Raphaël Thériault 2019-10-21 17:22:42 -04:00
parent 5562820c14
commit 29bb955757
2 changed files with 2 additions and 1 deletions

View File

@ -123,7 +123,6 @@ macro_rules! delete {
}
/// GET the config info
#[cfg(feature = "dev")]
pub fn get_config(
request: HttpRequest,
config: web::Data<Config>,

View File

@ -264,6 +264,8 @@ pub fn init() -> Config {
eprintln!("Can't read token: {}", e);
process::exit(1);
});
token = token.replace("\r", "");
token = token.replace("\n", "");
let token_hash = hash(&token);
let token_path = get_token_path();
fs::write(&token_path, token_hash.as_slice()).unwrap_or_else(|e| {