changed to divide meeting check

This commit is contained in:
JaeeunCho 2017-07-11 12:26:07 -07:00
parent 9938ee6575
commit fbdea71f8d

View File

@ -30,7 +30,9 @@ export default function userLeaving(credentials, userId) {
const User = Users.findOne(selector);
const Meeting = Meetings.findOne({ meetingId: meetingId });
if(Meeting) {
if(!Meeting) {
return;
}
if (!User) {
throw new Meteor.Error(
@ -65,8 +67,6 @@ export default function userLeaving(credentials, userId) {
Users.update(selector, modifier, cb);
}
}
const payload = {
meeting_id: meetingId,
userid: userId,