mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-09-10 10:45:57 +03:00
Implement update_revision trigger
This commit is contained in:
@@ -154,6 +154,16 @@ impl User {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn update_revision(&mut self, conn: &DbConn) -> QueryResult<()> {
|
||||
diesel::update(
|
||||
users::table.filter(
|
||||
users::uuid.eq(&self.uuid)
|
||||
)
|
||||
)
|
||||
.set(users::updated_at.eq(Utc::now().naive_utc()))
|
||||
.execute(&**conn).and(Ok(()))
|
||||
}
|
||||
|
||||
pub fn find_by_mail(mail: &str, conn: &DbConn) -> Option<Self> {
|
||||
let lower_mail = mail.to_lowercase();
|
||||
users::table
|
||||
|
Reference in New Issue
Block a user