Only send one notification per vault import and purge, improve move ciphers functions

This commit is contained in:
Daniel García
2019-01-28 00:39:14 +01:00
parent f935f5cf46
commit bef1183c49
5 changed files with 83 additions and 83 deletions

View File

@@ -241,7 +241,9 @@ impl CollectionUser {
pub fn delete_all_by_collection(collection_uuid: &str, conn: &DbConn) -> EmptyResult {
CollectionUser::find_by_collection(&collection_uuid, conn)
.iter()
.for_each(|collection| User::update_uuid_revision(&collection.user_uuid, conn));
.for_each(|collection| {
User::update_uuid_revision(&collection.user_uuid, conn);
});
diesel::delete(users_collections::table.filter(users_collections::collection_uuid.eq(collection_uuid)))
.execute(&**conn)