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

Added delete button to the edit page

This commit is contained in:
Scott
2016-02-19 16:11:52 -05:00
parent fd871aa04a
commit 30dab729bb
4 changed files with 37 additions and 11 deletions

View File

@@ -43,7 +43,7 @@ module.exports = function(app){
});
app.get('/homebrew/remove/:id', function(req, res){
if(req.query && req.query.admin_key == process.env.ADMIN_KEY){
//if(req.query && req.query.admin_key == process.env.ADMIN_KEY){
HomebrewModel.find({editId : req.params.id}, function(err, objs){
console.log(err);
if(!objs.length || err) return res.status(404).send("Can not find homebrew with that id");
@@ -53,9 +53,9 @@ module.exports = function(app){
return res.status(200).send();
})
});
}else{
return res.status(401).send('Access denied');
}
//}else{
// return res.status(401).send('Access denied');
//}
});
app.get('/homebrew/clear', function(req, res){