add endpoint to add spells

This commit is contained in:
Andrew Zhu
2019-02-05 13:59:55 -08:00
parent 612575d0e6
commit fedda62c7c
3 changed files with 32 additions and 6 deletions

View File

@@ -132,6 +132,9 @@ makeParent = function(collection, donatedKeys){
};
var checkPermission = function(userId, charId){
if (Meteor.isServer) { // we always trust server
return true;
}
var char = Characters.findOne(charId, {fields: {owner: 1, writers: 1}});
if (!char)
throw new Meteor.Error("Access Denied, no charId",