Skip to content

Instantly share code, notes, and snippets.

@dgolant
Last active November 7, 2017 15:19
Show Gist options
  • Save dgolant/eb695bcc57914ab89486f88245557a0c to your computer and use it in GitHub Desktop.
Save dgolant/eb695bcc57914ab89486f88245557a0c to your computer and use it in GitHub Desktop.
app.post(‘/linksforuser’, function (req, res) {
if (!req.body.important_value) {
logger.debug(‘USER UPDATE POST FAILED: MISSING IMPORTANT VALUE’, {
request_body: req.body
});
res.status(400).send(‘Body Important Value Missing: ‘+req.body);
}
if (!req.body.data1) {
logger.debug(‘USER UPDATE POST FAILED: MISSING DATA1 VALUE’, {
request_body: req.body
});
res.status(400).send(‘Body Properties Missing: ‘+req.body);
}
if (!req.body.data2) {
logger.debug(‘USER UPDATE POST FAILED: MISSING DATA2 VALUE’, {
request_body: req.body
})
res.status(400).send(‘Body Properties Missing: ‘+req.body);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment