Use getModel instead of contentTypes

This commit is contained in:
Convly 2023-07-03 10:13:57 +02:00
parent d21f34e436
commit e5854ec0de

View File

@ -25,7 +25,7 @@ module.exports = ({ strapi }) => {
const { args, resourceUID } = parent;
const { start, limit } = args;
const safeLimit = Math.max(limit, 1);
const contentType = strapi.contentTypes[resourceUID];
const contentType = strapi.getModel(resourceUID);
const sanitizedQuery = await sanitize.contentAPI.query(args, contentType, {
auth: ctx?.state?.auth,