removed uneeded functions

This commit is contained in:
Joshua Perry 2024-06-07 22:32:15 +01:00
parent 08accea6af
commit 9e889a38c5
1 changed files with 1 additions and 22 deletions

View File

@ -103,17 +103,7 @@ pub struct User {
pub auth: Option<Auth>,
pub username: String,
}
impl User {
pub fn new(username: String) -> Self {
let id = None;
let auth = Default::default();
Self {
id,
auth,
username,
}
}
}
#[derive(Clone, Default, Serialize, Deserialize)]
pub struct Auth {
#[serde(rename = "_hash", skip_serializing_if = "Option::is_none")]
@ -121,14 +111,3 @@ pub struct Auth {
#[serde(rename = "_salt", skip_serializing_if = "Option::is_none")]
pub salt: Option<String>,
}
impl Auth {
pub fn from_hash(hash: String) -> Self {
let salt = None;
let hash = Some(hash);
Self {
hash,
salt,
}
}
}