mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-20 12:48:52 +00:00
Removed more variable assignments that were never getting set
This commit is contained in:
parent
68f764bca6
commit
95f1c01b01
1 changed files with 1 additions and 5 deletions
|
|
@ -285,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;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -305,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);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -549,7 +547,6 @@ api.leave = function(req, res, next) {
|
|||
],function(err){
|
||||
if (err) return next(err);
|
||||
return res.send(204);
|
||||
user = group = keep = null;
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -786,7 +783,6 @@ api.removeMember = function(req, res, next){
|
|||
});
|
||||
}else{
|
||||
return res.json(400, {err: "User not found among group's members!"});
|
||||
group = uuid = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue