fix: #531, acp page on subfolder install

main
Barış Soner Uşaklı 3 years ago
parent ef4fd1b78a
commit d6d4639626

@ -6,9 +6,11 @@ const user = require.main.require('./src/user');
const library = module.exports;
library.init = async function (params) {
const { app, middleware } = params;
app.get('/admin/plugins/persona', middleware.admin.buildHeader, renderAdmin);
app.get('/api/admin/plugins/persona', renderAdmin);
const { router, middleware } = params;
const routeHelpers = require.main.require('./src/routes/helpers');
routeHelpers.setupAdminPageRoute(router, '/admin/plugins/persona', middleware, [], (req, res) => {
res.render('admin/plugins/persona', {});
});
};
library.addAdminNavigation = async function (header) {
@ -58,10 +60,6 @@ library.getThemeConfig = async function (config) {
return config;
};
function renderAdmin(req, res) {
res.render('admin/plugins/persona', {});
}
library.addUserToTopic = async function (hookData) {
const settings = await meta.settings.get('persona');
if (settings.enableQuickReply === 'on') {

Loading…
Cancel
Save