Skip to content

Instantly share code, notes, and snippets.

@eduardoromero
Created September 24, 2017 18:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eduardoromero/339fe12e2a61d988d753b3b531ce60e8 to your computer and use it in GitHub Desktop.
Save eduardoromero/339fe12e2a61d988d753b3b531ce60e8 to your computer and use it in GitHub Desktop.
Serverless WebTask API - DELETE
server.delete('/:id', (req, res, next) => {
const id = req.params.id
req.db.table('shares').get(id).delete()
.then((response) => {
res.status(200).json({
response
})
})
.catch(error => res.status(500).send({error}))
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment