mirror of
https://github.com/strapi/strapi.git
synced 2025-12-28 15:44:59 +00:00
Use getModel instead of contentTypes
This commit is contained in:
parent
d21f34e436
commit
e5854ec0de
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user