Re-wrote parenting, should be significantly faster, more maintainable

This commit is contained in:
Stefan Zermatten
2019-03-08 13:57:24 +02:00
parent 15c11e16ab
commit febb65a513
10 changed files with 339 additions and 264 deletions

View File

@@ -0,0 +1,11 @@
const collectionDoesntExistError = function(collectionName){
throw new Meteor.Error('bad-collection-reference',
`Parent references collection ${collectionName}, which does not exist`
);
};
const getCollectionByName = function(name){
return Mongo.Collection.get(name) || collectionDoesntExistError(name);
};
export default getCollectionByName;