PricingDocsAcademy
Bluesky ...
Wed, Dec 11, 10:16 PM

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

  • /attachments/1298982495353569290/1298982495555031162/Screenshot_2024-10-24_at_9.10.54_PM.png

    SOL

    1 month 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
    Screenshot_2024-10-24_at_9.10.54_PM.png
    Screenshot_2024-10-24_at_9.10.49_PM.png
  • Max

    1 month 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
  • SOL

    1 month ago

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

    1 month ago

    Fixed the header, but problem still persists 😢
  • Tod

    1 month ago

    Great energy @SOL! Your continuous contribution to the toddle Community just made you advance to Community Level 1!
  • Lucas G

    1 month 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
  • Lucas G

    1 month 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
  • SOL

    1 month 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!
  • Lucas G

    1 month ago

    It could be that Xano doesn't do things like other APIs/backends
  • Lucas G

    1 month 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

    1 month 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.
  • Lucas G

    1 month ago

    Ah I see
  • Max

    1 month 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
  • Lucas G

    1 month 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

    1 month ago

    I think so. And I think I remember that guys in the WeWeb forum had issues with the Xano behavior
  • Lucas G

    1 month ago

    I know you don't use Xano either though so maybe not best people to ask lol
  • Max

    1 month ago

    Nope. Just two guys guessing 😁
  • SOL

    1 month ago

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

Stop scrolling. Start building.

toddle is a visual web app builder that rivals custom code — but accessible to your entire team!

Try toddle — it's free!

© Copyright 2024 toddle. All rights reserved.