mirror of
https://github.com/stolksdorf/homebrewery.git
synced 2025-12-23 01:01:28 +00:00
moved welcome message and adding in egads errors
This commit is contained in:
@@ -32,25 +32,13 @@ const Middleware = {
|
||||
if(req.isAdmin) return next();
|
||||
return res.sendStatus(401);
|
||||
},
|
||||
validate : (req, res, next) => {
|
||||
//Only allow admin or brew authors pass.
|
||||
|
||||
return next();
|
||||
},
|
||||
|
||||
|
||||
//Loaders
|
||||
loadBrew : (req, res, next) => {
|
||||
//Loads a brew by edit id
|
||||
if(req.params.shareId){
|
||||
BrewData.get({ shareId : req.params.shareId})
|
||||
.then((brew))
|
||||
}else if(req.params.editId){
|
||||
|
||||
|
||||
}else{
|
||||
return next();
|
||||
}
|
||||
//TODO: move validate into hurrr
|
||||
},
|
||||
viewBrew : (req, res, next) => {
|
||||
//load by share
|
||||
|
||||
Reference in New Issue
Block a user