todo day 3 - update todo input changes/removes task name

  • exuberant_raccoon_64841-1298982495353569290

    SOL

    6 months ago

    Hey

    I'm trying to complete the 7 day quick start tutorial.

    Completed most of day 3 except right now I'm facing this problem where checking off a task marks it as completed but removes the task name from the db in xano.

    can anyone tell me what I'm doing wrong here
    1298982495555031162-Screenshot_2024-10-24_at_9.10.54_PM.png
    1298982495844565144-Screenshot_2024-10-24_at_9.10.49_PM.png
  • max.kayr-1298984280428642344

    Max

    6 months ago

    I don't know Xano, but you are sending the completed value as the header. That can't be right. It should probably be in the body
  • exuberant_raccoon_64841-1298997976865439784

    SOL

    6 months ago

    Ahh wait.. you’re right careless on my part. Let me try it
  • exuberant_raccoon_64841-1299009048909189191

    SOL

    6 months ago

    Fixed the header, but problem still persists 😢
  • Tod-1299009050616266823

    Tod

    6 months ago

    Great energy @SOL! Your continuous contribution to the toddle Community just made you advance to Community Level 1!
  • lucasg-1299031936601292931

    Lucas G

    6 months ago

    You are using POST, which normally creates a new row item
  • It should be a PATCH
  • What is likely happening is that you are technically creating a new item instead of updating the existing item
  • But since you’re not passing in the other data, it’ll just be empty
  • A patch update should update only the column you are passing in
  • lucasg-1299033421280182304

    Lucas G

    6 months ago

    Id columns, or specifically Primary Key columns need to be properly declared and be unique to avoid this type of thing.
  • If that’s the actual issue
  • exuberant_raccoon_64841-1299039690573484114

    SOL

    6 months ago

    Hmm.. interesting

    Was just following this tutorial here
    https://youtu.be/NItmmOhjXbA?t=4165

    seemed to work for @Andreas Møller

    But I’ll try it out tho, thanks!
  • lucasg-1299039882844569600

    Lucas G

    6 months ago

    It could be that Xano doesn't do things like other APIs/backends
  • lucasg-1299040186998587403

    Lucas G

    6 months ago

    If it is not that, then we'd need to see the whole API call setup to help more. Hard to tell otherwise
  • max.kayr-1299050923829624925

    Max

    6 months ago

    I think that in Xano you can do what you want with PUT/POST/PATCH. It is up to you what you do in the function stack.
  • lucasg-1299051055191031811

    Lucas G

    6 months ago

    Ah I see
  • max.kayr-1299051283067437056

    Max

    6 months ago

    @SOL A good place to start are the Xano logs. You can see if the data arrives Xano as expected and what you do there
  • lucasg-1299051591093063680

    Lucas G

    6 months ago

    So Xano itself has to be configured to not overwrite all the data if an Id exists? That doesn't sound like it should work like that by default
  • max.kayr-1299051812422418484

    Max

    6 months ago

    I think so. And I think I remember that guys in the WeWeb forum had issues with the Xano behavior
  • lucasg-1299051830516646010

    Lucas G

    6 months ago

    I know you don't use Xano either though so maybe not best people to ask lol
  • max.kayr-1299051921104961597

    Max

    6 months ago

    Nope. Just two guys guessing 😁
  • exuberant_raccoon_64841-1299226628907470868

    SOL

    6 months ago

    I'll try to figure it out, appreciate you guys help either way!