-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to delete remote objects? #1
Comments
Hello! Thanks for trying out Atmos2. Deleting is not implemented yet, here's one thing you can do:
Of course it's just a workaround and I'm planning to implement the deleting functionality (with offline support) soon. I will keep this issue open and come back when there's some progress. |
Thanks for info! |
I have the remote delete working now. Here's what it looks like in my Controller.
Let me know if you make any progress on the offline support! |
For some reason my previous delete implementation is no longer working correctly. Basically, it sends the DELETE request, which is successful on the server, but then immediately sends a PUT request with the same data, which seems to recreate the object. Here's the console log: DELETE http://localhost:8000/api/services/161/ 204 NO CONTENT 292ms Any idea why it's sending a PUT request after DELETE? |
Here is some additional info after further testing:
Results in:
Results in: It seems that @item.destory() is triggering the PUT request, but I'm still trying to isolate where in the code this is happening. |
First of all, thank you for making this project available. I am integrating it with a spine project to allow for offline syncing, and so far I have setup get, create, and update actions that sync local storage with the remote server. However, I have not been able to figure out how to delete objects from the remote server. Calling @item.destroy() removes an item from the list, but it doesn't send a DELETE request to the remote server (even with {remote: true}). Is delete support currently available in atmos2? Can you recommend how it might be implemented for online and offline use? Thanks!
The text was updated successfully, but these errors were encountered: