mirror of
https://github.com/dani-garcia/vaultwarden
synced 2024-12-14 17:43:46 +01:00
Actually update the revision date for user struct, not just in DB
This commit is contained in:
parent
6fdeeb56ce
commit
4fb09c5b4d
1 changed files with 2 additions and 1 deletions
|
@ -155,12 +155,13 @@ impl User {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn update_revision(&mut self, conn: &DbConn) -> QueryResult<()> {
|
pub fn update_revision(&mut self, conn: &DbConn) -> QueryResult<()> {
|
||||||
|
self.updated_at = Utc::now().naive_utc();
|
||||||
diesel::update(
|
diesel::update(
|
||||||
users::table.filter(
|
users::table.filter(
|
||||||
users::uuid.eq(&self.uuid)
|
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(()))
|
.execute(&**conn).and(Ok(()))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue