Skip to content
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

Only upload questionnaire via js in editor, when there are differences #19

Open
TheRadialActive opened this issue Jul 15, 2019 · 3 comments

Comments

@TheRadialActive
Copy link
Contributor

Now always the questionnaire edited will be send via POST to the server and writes into the database. Let's reduce those requests via comparing the saved questionnaire with the one in the browser before sending it off.

@benzea
Copy link
Member

benzea commented Jul 16, 2019

Hmm, is this to prevent the document from being re-rendered subsequently even though nothing actually changed?

@TheRadialActive
Copy link
Contributor Author

That's one thing, but another is, that we now (2 minutes ago) got a new field called "updated_at", which always sets the date, when the model is saved. So if we always write to the database via the editor, we, even when not changing a thing, get a new date at "updated_at", which might be confusing to people at the survey_list page.

@benzea
Copy link
Member

benzea commented Jul 16, 2019

Yeah, mostly wondered on whether this should happen on the server or client. Doing it on the server seems easier/safer in general, but I also see advantages of doing it client side. And knowing whether to expect a new document in the client is useful.

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

No branches or pull requests

2 participants