mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
deprecating middleware.prepareAPI in favour of using app.all('*') in /api namespace
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user