mirror of
https://github.com/SinTan1729/chhoto-url
synced 2024-12-26 07:38:36 -06:00
chg: Change the env_var name
This commit is contained in:
parent
f9e642275a
commit
088cd594a5
1 changed files with 2 additions and 2 deletions
|
@ -28,8 +28,8 @@ pub fn add_link(req: String, db: &Connection) -> (bool, String) {
|
||||||
let chunks: Vec<&str> = req.split(';').collect();
|
let chunks: Vec<&str> = req.split(';').collect();
|
||||||
let longlink = String::from(chunks[0]);
|
let longlink = String::from(chunks[0]);
|
||||||
|
|
||||||
let style = env::var("slug-style").unwrap_or(String::from("pair"));
|
let style = env::var("slug_style").unwrap_or(String::from("pair"));
|
||||||
let len_str = env::var("slug-length").unwrap_or(String::from("8"));
|
let len_str = env::var("slug_length").unwrap_or(String::from("8"));
|
||||||
let mut len: usize = len_str.parse().unwrap_or(8);
|
let mut len: usize = len_str.parse().unwrap_or(8);
|
||||||
if len < 4 {
|
if len < 4 {
|
||||||
len = 4;
|
len = 4;
|
||||||
|
|
Loading…
Reference in a new issue