fixed 0 subscribers bug

This commit is contained in:
Yaman Qalieh 2016-08-15 10:42:35 -04:00
parent 6f29a1a02a
commit 58522390df

View File

@ -341,7 +341,7 @@ Meteor.methods({
pass === found.code &&
found.banned.indexOf(Meteor.userId()) === -1 &&
prof.classes.indexOf(change) === -1) {
classes.update({_id: found._id}, {$set: {subscribers: found.subscribers + 1}});
var current = Meteor.user().profile;
current.classes.push(change);
Meteor.users.update({