1
0
Fork 0
mirror of https://github.com/SinTan1729/chhoto-url synced 2024-12-26 23:58:35 -06:00

chg: Change the env_var name

This commit is contained in:
Sayantan Santra 2024-03-31 00:45:29 -05:00
parent f9e642275a
commit 088cd594a5
Signed by: SinTan1729
GPG key ID: EB3E68BFBA25C85F

View file

@ -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;