chg: Changed some struct names

This commit is contained in:
SinTan1729
2024-03-31 16:07:33 -05:00
parent 4f80b1b522
commit 34518affaf
2 changed files with 6 additions and 6 deletions

View File

@@ -8,7 +8,7 @@ use rusqlite::Connection;
use serde::Deserialize;
#[derive(Deserialize)]
struct Url {
struct URLPair {
shortlink: String,
longlink: String,
}
@@ -32,7 +32,7 @@ pub fn getall(db: &Connection) -> String {
}
pub fn add_link(req: String, db: &Connection) -> (bool, String) {
let mut chunks: Url = serde_json::from_str(&req).unwrap();
let mut chunks: URLPair = serde_json::from_str(&req).unwrap();
let style = env::var("slug_style").unwrap_or(String::from("Pair"));
let len_str = env::var("slug_length").unwrap_or(String::from("8"));