added feeds

This commit is contained in:
2023-09-17 11:54:37 +02:00
parent 018bbf3918
commit 43e5d473b7
21 changed files with 76 additions and 25 deletions
+23
View File
@@ -0,0 +1,23 @@
extern crate bcrypt;
use bcrypt::verify;
use diesel::{Identifiable, Queryable};
use crate::schema::users;
#[derive(Queryable, Identifiable)]
#[diesel(table_name=users)]
#[derive(Clone)]
pub struct User {
pub id: i32,
pub username: String,
pub email: String,
pub password: String,
pub unique_id: String,
}
impl User {
pub fn verify(self, password: String) -> bool {
return verify(password.as_str(), &self.password).unwrap();
}
}