|
|
|
@ -5,57 +5,57 @@ const helpers = require('./helpers');
|
|
|
|
|
module.exports = function (app, name, middleware, controllers) {
|
|
|
|
|
const middlewares = [middleware.pluginHooks];
|
|
|
|
|
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}`, middleware, middlewares, controllers.admin.routeIndex);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}`, middlewares, controllers.admin.routeIndex);
|
|
|
|
|
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/dashboard`, middleware, middlewares, controllers.admin.dashboard.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/dashboard/logins`, middleware, middlewares, controllers.admin.dashboard.getLogins);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/dashboard/users`, middleware, middlewares, controllers.admin.dashboard.getUsers);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/dashboard/topics`, middleware, middlewares, controllers.admin.dashboard.getTopics);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/dashboard/searches`, middleware, middlewares, controllers.admin.dashboard.getSearches);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/dashboard`, middlewares, controllers.admin.dashboard.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/dashboard/logins`, middlewares, controllers.admin.dashboard.getLogins);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/dashboard/users`, middlewares, controllers.admin.dashboard.getUsers);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/dashboard/topics`, middlewares, controllers.admin.dashboard.getTopics);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/dashboard/searches`, middlewares, controllers.admin.dashboard.getSearches);
|
|
|
|
|
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/manage/categories`, middleware, middlewares, controllers.admin.categories.getAll);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/manage/categories/:category_id`, middleware, middlewares, controllers.admin.categories.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/manage/categories/:category_id/analytics`, middleware, middlewares, controllers.admin.categories.getAnalytics);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/manage/categories`, middlewares, controllers.admin.categories.getAll);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/manage/categories/:category_id`, middlewares, controllers.admin.categories.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/manage/categories/:category_id/analytics`, middlewares, controllers.admin.categories.getAnalytics);
|
|
|
|
|
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/manage/privileges/:cid?`, middleware, middlewares, controllers.admin.privileges.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/manage/tags`, middleware, middlewares, controllers.admin.tags.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/manage/privileges/:cid?`, middlewares, controllers.admin.privileges.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/manage/tags`, middlewares, controllers.admin.tags.get);
|
|
|
|
|
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/manage/users`, middleware, middlewares, controllers.admin.users.index);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/manage/registration`, middleware, middlewares, controllers.admin.users.registrationQueue);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/manage/users`, middlewares, controllers.admin.users.index);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/manage/registration`, middlewares, controllers.admin.users.registrationQueue);
|
|
|
|
|
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/manage/admins-mods`, middleware, middlewares, controllers.admin.adminsMods.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/manage/admins-mods`, middlewares, controllers.admin.adminsMods.get);
|
|
|
|
|
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/manage/groups`, middleware, middlewares, controllers.admin.groups.list);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/manage/groups/:name`, middleware, middlewares, controllers.admin.groups.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/manage/groups`, middlewares, controllers.admin.groups.list);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/manage/groups/:name`, middlewares, controllers.admin.groups.get);
|
|
|
|
|
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/manage/uploads`, middleware, middlewares, controllers.admin.uploads.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/manage/digest`, middleware, middlewares, controllers.admin.digest.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/manage/uploads`, middlewares, controllers.admin.uploads.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/manage/digest`, middlewares, controllers.admin.digest.get);
|
|
|
|
|
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/settings/email`, middleware, middlewares, controllers.admin.settings.email);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/settings/user`, middleware, middlewares, controllers.admin.settings.user);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/settings/post`, middleware, middlewares, controllers.admin.settings.post);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/settings/languages`, middleware, middlewares, controllers.admin.settings.languages);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/settings/navigation`, middleware, middlewares, controllers.admin.settings.navigation);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/settings/homepage`, middleware, middlewares, controllers.admin.settings.homepage);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/settings/social`, middleware, middlewares, controllers.admin.settings.social);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/settings/:term?`, middleware, middlewares, controllers.admin.settings.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/settings/email`, middlewares, controllers.admin.settings.email);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/settings/user`, middlewares, controllers.admin.settings.user);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/settings/post`, middlewares, controllers.admin.settings.post);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/settings/languages`, middlewares, controllers.admin.settings.languages);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/settings/navigation`, middlewares, controllers.admin.settings.navigation);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/settings/homepage`, middlewares, controllers.admin.settings.homepage);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/settings/social`, middlewares, controllers.admin.settings.social);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/settings/:term?`, middlewares, controllers.admin.settings.get);
|
|
|
|
|
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/appearance/:term?`, middleware, middlewares, controllers.admin.appearance.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/appearance/:term?`, middlewares, controllers.admin.appearance.get);
|
|
|
|
|
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/extend/plugins`, middleware, middlewares, controllers.admin.plugins.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/extend/widgets`, middleware, middlewares, controllers.admin.extend.widgets.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/extend/rewards`, middleware, middlewares, controllers.admin.extend.rewards.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/extend/plugins`, middlewares, controllers.admin.plugins.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/extend/widgets`, middlewares, controllers.admin.extend.widgets.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/extend/rewards`, middlewares, controllers.admin.extend.rewards.get);
|
|
|
|
|
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/advanced/database`, middleware, middlewares, controllers.admin.database.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/advanced/events`, middleware, middlewares, controllers.admin.events.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/advanced/hooks`, middleware, middlewares, controllers.admin.hooks.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/advanced/logs`, middleware, middlewares, controllers.admin.logs.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/advanced/errors`, middleware, middlewares, controllers.admin.errors.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/advanced/errors/export`, middleware, middlewares, controllers.admin.errors.export);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/advanced/cache`, middleware, middlewares, controllers.admin.cache.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/advanced/database`, middlewares, controllers.admin.database.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/advanced/events`, middlewares, controllers.admin.events.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/advanced/hooks`, middlewares, controllers.admin.hooks.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/advanced/logs`, middlewares, controllers.admin.logs.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/advanced/errors`, middlewares, controllers.admin.errors.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/advanced/errors/export`, middlewares, controllers.admin.errors.export);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/advanced/cache`, middlewares, controllers.admin.cache.get);
|
|
|
|
|
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/development/logger`, middleware, middlewares, controllers.admin.logger.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/development/info`, middleware, middlewares, controllers.admin.info.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/development/logger`, middlewares, controllers.admin.logger.get);
|
|
|
|
|
helpers.setupAdminPageRoute(app, `/${name}/development/info`, middlewares, controllers.admin.info.get);
|
|
|
|
|
|
|
|
|
|
apiRoutes(app, name, middleware, controllers);
|
|
|
|
|
};
|
|
|
|
|