-
-
Save amandeepmittal/41ba35f9fccb07bdccca7026ee533242 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const TodoItem = require('../models').TodoItem; | |
module.exports = { | |
create(req, res) { | |
return TodoItem.create({ | |
content: req.body.content, | |
todoId: req.params.todoId | |
}) | |
.then(todoItem => res.status(201).send(todoItem)) | |
.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