mirror of
https://github.com/strapi/strapi.git
synced 2025-09-20 14:00:48 +00:00
Update branch
Merge branch 'plugin/settings-manager-dev' of https://github.com/strapi/strapi into plugin/settings-manager-dev
This commit is contained in:
commit
e4ee6bf3be
@ -65,7 +65,8 @@ module.exports = {
|
||||
update: async ctx => {
|
||||
const Service = strapi.plugins['settings-manager'].services.settingsmanager;
|
||||
const { slug, env } = ctx.params;
|
||||
let params = ctx.request.body;
|
||||
let params = ctx.request.body.fields;
|
||||
|
||||
|
||||
if (env && _.isEmpty(_.find(Service.getEnvironments(), { name: env }))) return ctx.badRequest(null, [{ messages: [{ id: 'request.error.environment.unknown' }] }]);
|
||||
|
||||
|
@ -598,7 +598,15 @@ module.exports = {
|
||||
return databases;
|
||||
},
|
||||
|
||||
getItems: model => _.flatten(_.map(model.sections, section => section.items)),
|
||||
getItems: model => {
|
||||
return _.flatten(_.map(model.sections, section => {
|
||||
let items = section.items;
|
||||
|
||||
_.forEach(items, item => { if (item.type === 'boolean' && _.has(item, 'items')) items = _.concat(items, item.items) });
|
||||
|
||||
return items
|
||||
}));
|
||||
},
|
||||
|
||||
cleanParams: (params, items) => {
|
||||
const cleanParams = {};
|
||||
|
@ -171,7 +171,7 @@ class Strapi extends EventEmitter {
|
||||
|
||||
reload() {
|
||||
const reload = function() {
|
||||
if (cluster.isWorker && process.env.NODE_ENV === 'development' && this.config.environments[this.config.environment].server.reload === true) process.send('message');
|
||||
if (cluster.isWorker && process.env.NODE_ENV === 'development' && this.config.currentEnvironment.server.autoReload === true) process.send('message');
|
||||
};
|
||||
|
||||
reload.isReloading = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user