deprecating middleware.prepareAPI in favour of using app.all('*') in /api namespace

This commit is contained in:
psychobunny
2014-03-02 23:49:15 -05:00
parent 5b25e21606
commit d75bc9578b
3 changed files with 29 additions and 35 deletions

View File

@@ -15,11 +15,6 @@ var app,
translator = require('./../../public/src/translator'),
user = require('./../user');
middleware.prepareAPI = function(req, res, next) {
res.locals.isAPI = true;
next();
};
middleware.authenticate = function(req, res, next) {
if(!req.user) {
if (res.locals.isAPI) {