Fixed a lot of UI to match new parenting API

This commit is contained in:
Thaum Rystra
2024-05-08 12:10:43 +02:00
parent 620634c6fd
commit 4a52c3af19
19 changed files with 108 additions and 77 deletions

View File

@@ -13,11 +13,17 @@ import inputProvider from './userInput/inputProviderForTests.testFn';
* Removes all creatures, properties, and creatureVariable documents from the database
*/
export async function removeAllCreaturesAndProps() {
return Promise.all([
CreatureProperties.removeAsync({}),
Creatures.removeAsync({}),
CreatureVariables.removeAsync({}),
]);
if (Meteor.isServer) {
return Promise.all([
CreatureProperties.removeAsync({}),
Creatures.removeAsync({}),
CreatureVariables.removeAsync({}),
]);
} else {
CreatureProperties.find({}).forEach(doc => CreatureProperties.remove(doc._id));
Creatures.find({}).forEach(doc => Creatures.remove(doc._id));
CreatureVariables.find({}).forEach((doc: any) => CreatureVariables.remove(doc._id));
}
}
/**