Created
February 5, 2019 06:51
-
-
Save bewarusman/161fca8412dd1b28be4b621cf689e589 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var createTodo = async (req, res, next) => { | |
try { | |
var text = req.body.text; | |
if(!text) { | |
var err = new Error('todo should be provided'); | |
err.msg = 'todo should be provided'; | |
err.status = 406; | |
next(err); | |
return; | |
} | |
} catch(err) { } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment