Skip to content

Instantly share code, notes, and snippets.

@dgolant
Created November 7, 2017 15:16
Show Gist options
  • Save dgolant/6f92fd4c2ebf8e2a9003872dc610b9cf to your computer and use it in GitHub Desktop.
Save dgolant/6f92fd4c2ebf8e2a9003872dc610b9cf to your computer and use it in GitHub Desktop.
app.post(‘/user/links’, function (req, res) {
if (!req.body.important_value || !req.body.data1 || !req.body.data2) {
logger.debug(‘USER UPDATE POST FAILED: MISSING VALUES’, {
request_body: req.body
});
res.status(400).send(‘Body Properties Missing: ‘ + req.body);
}
/* actual thing you want to do with this route */
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment