T
TanStack14mo ago
fair-rose

Mutation problem from different files

I have these 2 different pages which have identical API endpoints. Two of the API endpoints is for users and the other once are for organisations. What the API endpoints are doing is they are toggling a user between active/inactive and they take in a query parameter of the users/organisation id. The first page which is for a specific user(user:id) works perfectly fine but the same mutation with the changed API endpoint does not seem to be working at all. It's the exact same code but with minor tweaks. To not paste walls of text I have added the code to some pastebin files in hopes that this is fine https://pastebin.com/57WQ9H24 // user:id https://pastebin.com/4PuBEX1s // organisation:id
1 Reply
fair-rose
fair-roseOP14mo ago
I forgot to specify that the mutation I am doing in the organisation/id file is working but not the same way as the user/id is. The user/id toggles between true and false in the database while the one in organisation/id only works one way which is going from true to false.

Did you find this page helpful?