Merge pull request #14787 from strapi/fix/update-delete-mutations-ignore-locale

Fix the findParams argument to be passed correctly
This commit is contained in:
Christian 2022-11-15 16:44:41 +01:00 committed by GitHub
commit 16dda55874
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,7 +54,7 @@ module.exports = ({ strapi }) => {
.buildMutationsResolvers({ contentType });
const findParams = omit(['data', 'files'], transformedArgs);
const entity = await strapi.entityService.findMany(uid, { params: findParams });
const entity = await strapi.entityService.findMany(uid, findParams);
// Create or update
const value = isNil(entity)
@ -84,7 +84,7 @@ module.exports = ({ strapi }) => {
.get('content-api')
.buildMutationsResolvers({ contentType });
const entity = await strapi.entityService.findMany(uid, { params: transformedArgs });
const entity = await strapi.entityService.findMany(uid, transformedArgs);
if (!entity) {
throw new NotFoundError('Entity not found');