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

Change server AJAX response #508

Open
Messj1 opened this issue Mar 24, 2021 · 0 comments
Open

Change server AJAX response #508

Messj1 opened this issue Mar 24, 2021 · 0 comments

Comments

@Messj1
Copy link
Contributor

Messj1 commented Mar 24, 2021

Change the server response to something more meaningful so we can better handle ajax responses:

Yes, the error occurs if a empty string get respond. And if no lock was found no output get > produced.

action=lockedRecord returns currently on

  • lock: '{success=true, message=''}'
  • unlock: ''

better would be to use something like:

  • lock: '{"lock":true}'
  • unlock: '{"locked"=false}'
  • error: '' with HTTP 5xx on server error or 4xx on client side error like resource not found

Hint: Translation can be done on client

This should be improved later. For a fast hack i will do an fix as workaround in checkIfRecordIsLocked method. 🤨

Originally posted by @Messj1 in #506 (comment)

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

1 participant