vw_small

Hardened fork of Vaultwarden (https://github.com/dani-garcia/vaultwarden) with fewer features.
git clone https://git.philomathiclife.com/repos/vw_small
Log | Files | Refs | README

commit 4fb09c5b4d2ca1e6e2f263df3b27eacedf86422a
parent 6fdeeb56ce2361aac89aca7a69d9c9177b764254
Author: Miroslav Prasil <miroslav@prasil.info>
Date:   Tue, 21 Aug 2018 10:36:04 +0100

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

Diffstat:
Msrc/db/models/user.rs | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/db/models/user.rs b/src/db/models/user.rs @@ -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(())) }