Update field text within object using a request

Options

Hello Xano community,

I'm trying to update a property called "gallery_path" (text) within a object called "seo" (obj) using a request.

In order to do so, I created a endpoint /villas/{villas_id}/gallery_path and turned to visible the seo field which contains other various field among "gallery_path".

My goal is to update the "gallery_path" field without changing any of the others.

In order to do so, I updated the function stack of this endpoint to link the "gallery_path" to "seo.gallery_path" so that I can provide on my request a body like this :

{
  "villa_id" : 2413,
  "seo" : { 
"gallery_path" : "/gallery_path" } }

I you can see in the video the debugger return me an error, which I can't elude.

Do you have any idea of how I can troobleshoot this case ?

I'll appreciate your help

Thank you in advance,

The video of the situation :

https://www.loom.com/share/129ce42f5a864f7083c58b11e3c65ad1?sid=3fbf95fa-f0c7-4ee4-9a57-1298e57a5628

Tagged:

Comments

  • arturosanz
    arturosanz Member ✭✭
    Options

    @Lighthama it seems you are trying to edit the record id = 2413 but that record doesn't exist. The one you show in the video is id = 2449. That's probably why you get the error NOT FOUND.

    You can ignore he warning you get here …

    … because you have defined the seo object correctly, and gallery_path is TEXT. However, you could avoid it if you do this: gallery_path (text) = seo (object) add the filter GET with path = gallery_path (text) and default value an empty TEXT. But it's not mandatory to do this.