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

Cleaned up the admin routes

This commit is contained in:
Scott Tolksdorf
2017-01-06 19:21:18 -05:00
parent ca40ec5a2d
commit a26c4e2092
9 changed files with 99 additions and 86 deletions

View File

@@ -3,6 +3,7 @@ const Error = require('egads').extend('Server Error', 500, 'Generic Server Error
Error.noBrew = Error.extend('Can not find a brew with that id', 404, 'No Brew Found');
Error.noAuth = Error.extend('You can not access this route', 401, 'Unauthorized');
Error.noAdmin = Error.extend('You need admin credentials to access this route', 401, 'Unauthorized');
Error.expressHandler = (err, req, res, next) => {