Skip to content

Instantly share code, notes, and snippets.

@HallM
Created January 14, 2016 23:05
Show Gist options
  • Save HallM/26ff20a1d31e9acf7f1c to your computer and use it in GitHub Desktop.
Save HallM/26ff20a1d31e9acf7f1c to your computer and use it in GitHub Desktop.
function privateHandlePut(req, res) {
// do things
}
function publicHandleGet(req, res) {
// do things
}
export.controller = {
publicHandleGet
}
export.routes = [
{method: ['POST', 'PUT'], url: 'things', pre-handlers: [verifyLoggedIn], handler: privateHandlePut},
{method: 'GET', url: 'thing/{thingid}', handler: handleGet}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment