Actually update the revision date for user struct, not just in DB

This commit is contained in:
Miroslav Prasil 2018-08-21 10:36:04 +01:00
parent 6fdeeb56ce
commit 4fb09c5b4d

View File

@ -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(()))
}