empiricaly / meteor-empirica-core

Core Meteor package for the experiment Empirica platform. This is where you should submit issues.
MIT License
27 stars 13 forks source link

Reset Games and Reset Entire App deletes custom collections #251

Closed Karakaii closed 3 years ago

Karakaii commented 3 years ago

In my MongoDB database, I have a collection where I put some configurations and then access those with Meteor. However, whenever I use Reset Games or Reset Entire App in the admin panel, it deletes that collection. I would except these buttons to delete specific collections, not delete all collections but X. I regularly want to delete the games I use for testing, but I don't want to insert my collection every time I do that. Is there a way of fixing this?

This was with empirica:core 1.15.1, and with 1.16.0.

npaton commented 3 years ago

We need to invert the DB deleting from a list of collections to keep to a list of collections to delete.

https://github.com/empiricaly/meteor-empirica-core/blob/master/api/admin/methods.js#L13