mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-15 00:12:17 +00:00
send response only if modified or drop
This commit is contained in:
parent
3b273dadee
commit
0c0e0834be
1 changed files with 8 additions and 1 deletions
|
|
@ -710,7 +710,14 @@ api.batchUpdate = function(req, res, next) {
|
|||
response = user.toJSON();
|
||||
response.wasModified = res.locals.wasModified;
|
||||
if (response._tmp && response._tmp.drop) response.wasModified = true;
|
||||
res.json(200, response);
|
||||
|
||||
// Send the response to the server
|
||||
if(response.wasModified){
|
||||
res.json(200, response);
|
||||
}else{
|
||||
res.json(204);
|
||||
}
|
||||
|
||||
return console.log("Reply sent");
|
||||
});
|
||||
};
|
||||
Loading…
Reference in a new issue