1
0
Fork 0
mirror of https://github.com/SinTan1729/chhoto-url synced 2024-10-16 13:27:03 -05:00

Compare commits

...

4 commits

6 changed files with 8 additions and 8 deletions

View file

@ -2,8 +2,8 @@
name: Bug report name: Bug report
about: Create a report to help us improve about: Create a report to help us improve
title: '' title: ''
labels: '' labels: 'bug'
assignees: '' assignees: 'SinTan1729'
--- ---

View file

@ -2,8 +2,8 @@
name: Feature request name: Feature request
about: Suggest an idea for this project about: Suggest an idea for this project
title: '' title: ''
labels: '' labels: 'feature-request'
assignees: '' assignees: 'SinTan1729'
--- ---

2
actix/Cargo.lock generated
View file

@ -475,7 +475,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]] [[package]]
name = "chhoto-url" name = "chhoto-url"
version = "5.0.1" version = "5.0.2"
dependencies = [ dependencies = [
"actix-files", "actix-files",
"actix-session", "actix-session",

View file

@ -1,6 +1,6 @@
[package] [package]
name = "chhoto-url" name = "chhoto-url"
version = "5.0.1" version = "5.0.2"
edition = "2021" edition = "2021"
authors = ["Sayantan Santra <sayantan[dot]santra689[at]gmail[dot]com"] authors = ["Sayantan Santra <sayantan[dot]santra689[at]gmail[dot]com"]
license = "mit" license = "mit"

View file

@ -12,7 +12,7 @@ pub fn get_longurl(shortlink: String, db: &Connection) -> String {
} }
fn validate_link(link: &str) -> bool { fn validate_link(link: &str) -> bool {
let re = Regex::new("[a-z0-9-_]+").unwrap(); let re = Regex::new("^[a-z0-9-_]+$").unwrap();
re.is_match(link) re.is_match(link)
} }