Merge branch 'develop' into hairlessbear-quest_invite_modal_on_user_sync

This commit is contained in:
Blade Barringer
2015-06-20 17:36:32 -05:00
259 changed files with 9481 additions and 8493 deletions
+1 -6
View File
@@ -211,7 +211,6 @@ api.create = function(req, res, next) {
if (err == 'Already in a party, try refreshing.') return res.json(400,{err:err});
if (err) return next(err);
return res.json(populated);
group = user = null;
})
}
}
@@ -286,7 +285,6 @@ api.postChat = function(req, res, next) {
group.save(function(err, saved){
if (err) return next(err);
return chatUpdated ? res.json({chat: group.chat}) : res.json({message: saved.chat[0]});
group = chatUpdated = null;
});
}
}
@@ -306,8 +304,7 @@ api.deleteChatMessage = function(req, res, next){
Group.update({_id:group._id}, {$pull:{chat:{id: req.params.messageId}}}, function(err){
if(err) return next(err);
chatUpdated ? res.json({chat: group.chat}) : res.send(204);
group = chatUpdated = null;
return chatUpdated ? res.json({chat: group.chat}) : res.send(204);
});
}
@@ -553,7 +550,6 @@ api.leave = function(req, res, next) {
],function(err){
if (err) return next(err);
return res.send(204);
user = group = keep = null;
})
}
@@ -790,7 +786,6 @@ api.removeMember = function(req, res, next){
});
}else{
return res.json(400, {err: "User not found among group's members!"});
group = uuid = null;
}
}