mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2024-12-26 23:25:56 -05:00
Merge pull request #143 from mprasil/update_revision_fix
Actually update the revision date for user struct, not just in DB
This commit is contained in:
commit
0fa48a749f
@ -155,12 +155,13 @@ impl User {
|
||||
}
|
||||
|
||||
pub fn update_revision(&mut self, conn: &DbConn) -> QueryResult<()> {
|
||||
self.updated_at = Utc::now().naive_utc();
|
||||
diesel::update(
|
||||
users::table.filter(
|
||||
users::uuid.eq(&self.uuid)
|
||||
)
|
||||
)
|
||||
.set(users::updated_at.eq(Utc::now().naive_utc()))
|
||||
.set(users::updated_at.eq(&self.updated_at))
|
||||
.execute(&**conn).and(Ok(()))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user