Skip to content
This repository was archived by the owner on Apr 9, 2020. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions routes/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ router.use('/users', config.DEV_MODE ? function(req,res,next){
return res.status(500).send("could not create the user");
});}:passport.authenticate('bearer'), require('./users'));

app.get('*', (req, res) => {
res.status(404).json({
"error": "404",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a json cannot have two keys of the same name. like javascript 101 my friend.

please at least run your code before you make PRs

"error":{
"message": "You are not a manager"
}
})
})

// config.DEV_MODE ? function (req, res, next) {
// next();
// } :
Expand Down