1
0
mirror of https://github.com/stolksdorf/homebrewery.git synced 2025-12-18 14:41:29 +00:00

Hot fix to test prod

This commit is contained in:
Scott Tolksdorf
2016-07-21 18:25:04 -04:00
parent 073b547f96
commit 46581cfcf5

View File

@@ -39,7 +39,10 @@ module.exports = function(app){
app.post('/api', function(req, res){
var newHomebrew = new HomebrewModel(req.body);
newHomebrew.save(function(err, obj){
if(err) return;
if(err){
console.error(err, err.toString(), err.stack);
return res.status(500).send("Error while creating new brew");
}
return res.json(obj);
})
});