Create a gist now

Instantly share code, notes, and snippets.

remove specialty
removeSpecialty: function(options) {
var userId = options.userId;
var toRemove = options.specialty || {};
var topic = Topics.findOne({});
var user = Meteor.users.findOne(userId)
throw new Meteor.Error("User not found")
throw new Meteor.Error("Topic not found")
var current =, function(obj){return obj._id})
if(_.isObject(topic)) {
if(_.contains(current,topic._id)) {
Meteor.users.remove({_id: topic._id})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment