How can I update components that are within a collection type?

System Information
  • Strapi Version: 3
  • Operating System: Windows 10
  • Database: Postgres
  • Node Version:
  • NPM Version:
  • Yarn Version:

Hi everyone. I’m working on a project that requires the user to update their address to their organization from a front end form (a long with a number of other things). All of the updates work to the organization collection type I have, but it’s when I try and update to Locations component I have, that I can’t seem to get it to POST.

Is there something specific I need to do for the strapi query within the controller that just isn’t working? It pulls the current field from the component no problem, but just won’t save the updates.

Everything is working but the streetAddress one. Nothing errors out, it just updates all but that. Any help would be greatly appreciated.

Here’s my current query.

 strapi.query('organization').update({ id }, {
      webSite: ctx.request.body.webSite,
      streetAddress: ctx.request.body.locations[0].streetAddress,

1 Like