mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2025-03-07 15:51:13 +00:00
parent
3bc90e71d4
commit
5133410451
1 changed files with 5 additions and 1 deletions
|
@ -205,7 +205,11 @@ impl User {
|
|||
}
|
||||
|
||||
pub fn auth(&self, pass: String) -> bool {
|
||||
bcrypt::verify(pass.as_str(), self.hashed_password.clone().unwrap().as_str()).is_ok()
|
||||
if let Ok(valid) = bcrypt::verify(pass.as_str(), self.hashed_password.clone().unwrap().as_str()) {
|
||||
valid
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
pub fn update_boxes(&self, conn: &PgConnection) {
|
||||
|
|
Loading…
Reference in a new issue