mirror of
https://github.com/dani-garcia/vaultwarden.wiki.git
synced 2026-10-24 22:26:50 +03:00
Update affected users revision on cipher and folder change
This commit is contained in:
1 parent
4f58d07c83
commit
2b2401be19
3 files changed
+45
-3
No files matched your search
@@ -71,6 +71,7 @@ use db::schema::{folders, folders_ciphers};
|
||||
/// Database methods
|
||||
impl Folder {
|
||||
pub fn save(&mut self, conn: &DbConn) -> bool {
|
||||
User::update_uuid_revision(&self.user_uuid, conn);
|
||||
self.updated_at = Utc::now().naive_utc();
|
||||
|
||||
match diesel::replace_into(folders::table)
|
||||
@@ -82,6 +83,7 @@ impl Folder {
|
||||
}
|
||||
|
||||
pub fn delete(self, conn: &DbConn) -> QueryResult<()> {
|
||||
User::update_uuid_revision(&self.user_uuid, conn);
|
||||
FolderCipher::delete_all_by_folder(&self.uuid, &conn)?;
|
||||
|
||||
diesel::delete(
|
||||
|
||||
Reference in new issue
Block a user