chg: Change the env_var name

This commit is contained in:
SinTan1729 2024-03-31 00:45:29 -05:00
parent f9e642275a
commit 088cd594a5
No known key found for this signature in database
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;