Password login enabled

This commit is contained in:
SinTan1729
2023-04-08 15:36:33 -05:00
parent 34b2b116ba
commit 96b3ae1297
4 changed files with 41 additions and 9 deletions

View File

@@ -58,6 +58,7 @@ pub fn delete_link(shortlink: String, db: &Connection) -> () {
pub fn open_db(path: String) -> Connection {
let db = Connection::open(path).expect("Unable to open database!");
// Create table if it doesn't exist
db.execute(
"CREATE TABLE IF NOT EXISTS urls (
id INTEGER PRIMARY KEY AUTOINCREMENT,