Add authenticateRequest middleware (#9795)

* Add  authenticateRequest middleware

to Post routes

* Fix linting error
isekai-main
uplift 3 years ago committed by GitHub
parent b06e8dba7b
commit 92d1ee31e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -60,7 +60,12 @@ _mounts.topic = (app, name, middleware, controllers) => {
};
_mounts.post = (app, name, middleware, controllers) => {
const middlewares = [middleware.maintenanceMode, middleware.registrationComplete, middleware.pluginHooks];
const middlewares = [
middleware.maintenanceMode,
middleware.authenticateRequest,
middleware.registrationComplete,
middleware.pluginHooks,
];
app.get(`/${name}/:pid`, middleware.busyCheck, middlewares, controllers.posts.redirectToPost);
app.get(`/api/${name}/:pid`, middlewares, controllers.posts.redirectToPost);
};

Loading…
Cancel
Save