Use strapi.contentTypes[uid] instead of strapi.plugin().contentType() to keep the same data structure

This commit is contained in:
Convly 2021-08-23 20:06:34 +02:00
parent d293ca52b1
commit 4620c330b8

View File

@ -211,9 +211,7 @@ const addMediaAttribute = options => {
context: { strapi },
} = options;
// todo[v4]: we shouldn't have to handle differently cts fetched
// with the .contentType() & those fetched using .contentTypes
const fileContentType = strapi.plugin('upload').contentType('file').schema;
const fileContentType = strapi.contentTypes['plugin::upload.file'];
const resolve = buildAssociationResolver({
contentTypeUID: contentType.uid,