How to update component in user collection

Instead of strapi.query.update use strapi.entityService.update
Example :-

    await strapi.entityService.update('plugin::users-permissions.user', ctx.state.user.id, {
      data: ctx.request.body
    }).then((res)=>{
      ctx.response.status = 200;
      ctx.response.body = res
    })
2 Likes