mirror of
https://github.com/strapi/strapi.git
synced 2025-12-26 06:35:47 +00:00
Hide config model in content type builder and content manager
This commit is contained in:
parent
29af75cc51
commit
0e739d8e32
@ -22,8 +22,11 @@ module.exports = {
|
||||
'associations'
|
||||
]);
|
||||
|
||||
const models = _.mapValues(strapi.models, pickData);
|
||||
delete models['strapi-configs'];
|
||||
|
||||
ctx.body = {
|
||||
models: _.mapValues(strapi.models, pickData),
|
||||
models,
|
||||
plugins: Object.keys(strapi.plugins).reduce((acc, current) => {
|
||||
acc[current] = {
|
||||
models: _.mapValues(strapi.plugins[current].models, pickData)
|
||||
|
||||
@ -10,6 +10,10 @@ module.exports = {
|
||||
const models = [];
|
||||
|
||||
_.forEach(strapi.models, (model, name) => {
|
||||
if (name === 'strapi-configs') {
|
||||
return true;
|
||||
}
|
||||
|
||||
models.push({
|
||||
icon: 'fa-cube',
|
||||
name: _.get(model, 'info.name', 'model.name.missing'),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user