I am trying to set the role for the logged in user (using alanning:roles package) via a method on the server. Here's what I have...
Client
var userId = Meteor.userId();
Meteor.call('updateRoles',userId,'admin');
And this is the simplified version of the method from the docs...
server/userMethods.js
Meteor.methods({
updateRoles: function (targetUserId, roles) {
Roles.setUserRoles(targetUserId, roles)
}
})
No matter what I try I keep getting the following error...
Error invoking Method 'updateRoles': Internal server error [500]