mirror of
https://github.com/stolksdorf/homebrewery.git
synced 2025-12-23 17:51:29 +00:00
Hot fix to test prod
This commit is contained in:
@@ -39,7 +39,10 @@ module.exports = function(app){
|
|||||||
app.post('/api', function(req, res){
|
app.post('/api', function(req, res){
|
||||||
var newHomebrew = new HomebrewModel(req.body);
|
var newHomebrew = new HomebrewModel(req.body);
|
||||||
newHomebrew.save(function(err, obj){
|
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);
|
return res.json(obj);
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user