Add originalBody parameter to update note api
When we are updating the note via the API, we don't have any way to prevent data lose. In this issue, we introduce a new optional parameter called original_body, which is used to check the note has not been updated since the client sending the api request has last seen the note.
Steps to reproduce
- Read the note as user A, user A thinks that
bodyis1234 - Read the note as user B, user B thinks that
bodyis1234 - User A submits a
updateNotemutation and changes the body toabcde - User B submits an
updateNotechanges the body towxyz**without having a chance of knowing they are overriding data they've never seen.
Related to: #323808