mirror of
https://github.com/minoplhy/chhoto-url.git
synced 2024-11-22 17:26:45 +00:00
chg: Change the env_var name
This commit is contained in:
parent
f9e642275a
commit
088cd594a5
@ -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 New Issue
Block a user