Skip to content

Improve client-server consistency by checking response status before updating locally#11

Open
maizena-y-javascript wants to merge 1 commit into
mluukkai:masterfrom
maizena-y-javascript:spa-post-status-check
Open

Improve client-server consistency by checking response status before updating locally#11
maizena-y-javascript wants to merge 1 commit into
mluukkai:masterfrom
maizena-y-javascript:spa-post-status-check

Conversation

@maizena-y-javascript
Copy link
Copy Markdown

Previously, the client assumed notes were accepted as soon as they were added locally (redrawNotes was called immediately after adding the note, regardless of the server response).
This change improves sync by verifying the server responded with status 201 after readyState 4, before pushing to memory and redrawing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant