atinux / atidone

A full-stack application with Auth, SSR and SQL, running on the edge with Nuxt.
https://todos.nuxt.dev
MIT License
730 stars 73 forks source link

Database isn't re-queried for updates when mutating or adding data #17

Closed daleweaver777 closed 8 months ago

daleweaver777 commented 8 months ago

It looks like the database isn't re-queried for updates when mutating or adding data.

Example: Open two browser windows with the same login. Add a new todo in window 1. Then go to window 2 and add another new todo. You would expect window 2 to not only add it's own todo, but also now show the todo that window 1 entered. If you do a hard refresh in window 2, the todo entered in window 1 will now show.

When posting, patching, or deleting to an endpoint, shouldn't a fresh copy of the todo's be retrieved from the database instead of just adding the changes to the in-memory array?

atinux commented 8 months ago

I updated to call refresh :)