Skip to content

Instantly share code, notes, and snippets.

@dgolant
Last active November 7, 2017 15:32
Show Gist options
  • Save dgolant/c5e99eeb02cd56a1b7003c444aa14a37 to your computer and use it in GitHub Desktop.
Save dgolant/c5e99eeb02cd56a1b7003c444aa14a37 to your computer and use it in GitHub Desktop.
const SCHEMA_POST_LINKS = require(‘. / request_schemas / link_collection_routes / links_POST_schema.js’);  
app.post(‘/user/links’, Celebrate({ 
body: SCHEMA_POST_LINKS 
}), (req, res) => { 
logger.info(‘POST received…\ tCreateUser’); /* hey look, 
a logging mistake I just 
discovered because 
I forgot to change what I c/p’d 
(I am not kidding);
*/
   // Here we add some links to a user object, 
  // knowing that our validation already happened
 
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment