Move all admin config

This commit is contained in:
Alexandre Bodin 2021-10-26 16:18:32 +02:00
parent c761aebb96
commit 5bb802fb06
3 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,7 @@ module.exports = async (ctx, next) => {
const configPath =
ct.plugin === 'admin'
? ['server.admin.layout', ct.modelName, 'actions', action]
? ['admin.layout', ct.modelName, 'actions', action]
: ['plugin', ct.plugin, 'layout', ct.modelName, 'actions', action];
const actionConfig = strapi.config.get(configPath);

View File

@ -20,8 +20,8 @@ module.exports = async function({ build, watchAdmin, polling, browser }) {
const config = loadConfiguration(dir);
const logger = createLogger(config.logger, {});
const adminWatchIgnoreFiles = getOr([], 'server.admin.watchIgnoreFiles')(config);
const serveAdminPanel = getOr(true, 'server.admin.serveAdminPanel')(config);
const adminWatchIgnoreFiles = getOr([], 'admin.watchIgnoreFiles')(config);
const serveAdminPanel = getOr(true, 'admin.serveAdminPanel')(config);
const buildExists = fs.existsSync(path.join(dir, 'build'));
// Don't run the build process if the admin is in watch mode

View File

@ -15,7 +15,7 @@ module.exports = function({ strapi }) {
// check if we should serve admin panel
const shouldServeAdmin = strapi.config.get(
'server.admin.serveAdminPanel',
'admin.serveAdminPanel',
strapi.config.get('serveAdminPanel')
);