mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-08-28 05:24:49 +00:00
Updated modified date when saving and removed hardcoded attachment domain
This commit is contained in:
parent
31bf2bc2b1
commit
912901780e
6 changed files with 14 additions and 19 deletions
|
@ -138,11 +138,11 @@ use db::schema::users;
|
|||
|
||||
/// Database methods
|
||||
impl User {
|
||||
pub fn save(&self, conn: &DbConn) -> bool {
|
||||
// TODO: Update modified date
|
||||
pub fn save(&mut self, conn: &DbConn) -> bool {
|
||||
self.updated_at = Utc::now().naive_utc();
|
||||
|
||||
match diesel::replace_into(users::table) // Insert or update
|
||||
.values(self)
|
||||
.values(&*self)
|
||||
.execute(&**conn) {
|
||||
Ok(1) => true, // One row inserted
|
||||
_ => false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue