'Strapi error when writing code for findOne method

i defined the findOne method in my controller:

async findOne(ctx) {
  
    const { id } = ctx.params;
  
    const { query } = ctx;
    console.log(strapi.services.users);
    const entity = await strapi.services.users.findOne(id, query);
  
    const sanitizedEntity = await this.sanitizeOutput(entity, ctx);
    
    return this.transformResponse(sanitizedEntity);
  }

but i have an error telling thar a field named '0' that doesn't appear on mymodel !

Your filters contain a field '0' that doesn't appear on your model definition nor it's relations

Strangely i have no field or value = 0!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source