mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 10:23:34 +00:00
Remove certain content types from ctm list
This commit is contained in:
parent
d0d0942a14
commit
f5a9494cb8
@ -9,9 +9,16 @@ module.exports = {
|
||||
* Returns the list of available content types
|
||||
*/
|
||||
listContentTypes(ctx) {
|
||||
const contentTypes = Object.keys(strapi.contentTypes).map(uid => {
|
||||
return service.formatContentType(strapi.contentTypes[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]);
|
||||
});
|
||||
|
||||
ctx.body = {
|
||||
data: contentTypes,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user