Skip to content

Instantly share code, notes, and snippets.

@amandeepmittal
Created December 3, 2018 04:35
Show Gist options
  • Save amandeepmittal/d61d8c38641fb74264d05b721a113068 to your computer and use it in GitHub Desktop.
Save amandeepmittal/d61d8c38641fb74264d05b721a113068 to your computer and use it in GitHub Desktop.
// after create()
list(req, res) {
return Todo.all()
.then(todos => res.status(201).send(todos))
.catch(error => res.status(400).send(error));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment