mirror of
https://github.com/strapi/strapi.git
synced 2025-11-03 19:36:20 +00:00
Remove certain content types from ctm list
This commit is contained in:
parent
d0d0942a14
commit
f5a9494cb8
@ -9,7 +9,14 @@ module.exports = {
|
|||||||
* Returns the list of available content types
|
* Returns the list of available content types
|
||||||
*/
|
*/
|
||||||
listContentTypes(ctx) {
|
listContentTypes(ctx) {
|
||||||
const contentTypes = Object.keys(strapi.contentTypes).map(uid => {
|
const contentTypes = Object.keys(strapi.contentTypes)
|
||||||
|
.filter(uid => {
|
||||||
|
if (uid.startsWith('strapi::')) return false;
|
||||||
|
if (uid === 'plugins::upload.file') return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
.map(uid => {
|
||||||
return service.formatContentType(strapi.contentTypes[uid]);
|
return service.formatContentType(strapi.contentTypes[uid]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user