Fixed soft-remove of props and library props

This commit is contained in:
ThaumRystra
2024-05-04 18:57:56 +02:00
parent c5f6ce81bd
commit c11013eddb
5 changed files with 44 additions and 38 deletions

View File

@@ -23,13 +23,7 @@ const restoreProperty = new ValidatedMethod({
assertEditPermission(rootCreature, this.userId);
// Do work
restore({
_id,
collection: CreatureProperties,
extraUpdates: {
$set: { dirty: true }
},
});
restore(CreatureProperties, property, { $set: { dirty: true } });
}
});

View File

@@ -23,7 +23,7 @@ const softRemoveProperty = new ValidatedMethod({
assertEditPermission(rootCreature, this.userId);
// Do work
softRemove({ _id, collection: CreatureProperties });
softRemove(CreatureProperties, property);
}
});