You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For now we can complitely grind all note (on web) just by highliting full note and pressing any character
We need to be able to check note content history and get back to the content that was actual some time ago
The first content comes from the PATCH method, the second we take as the last saved content from the history of this note
If the length differs by more than N, then we add a new record with the content of the note into public.notes_history table and update the note in public.notes table
getNoteHistoryByNoteId()
In this method we should return only additional info of note history (id, user_id, updated_at) that info will be displayed in web part
getHistoryRecordById()
In this method we need to return full record with content (this method will be used for preview of the history record)
Create NoteHistoryRepository and NoteHistoryStorage
Here we must provide data for the correct operation of the service methods
The text was updated successfully, but these errors were encountered:
Problem
For now we can complitely grind all note (on web) just by highliting full note and pressing any character
We need to be able to check note content history and get back to the content that was actual some time ago
Solution
Add new table with this structure:
also create note_id index
Create routes
GET /note/:id/history
For getting all history records info of the specific note
GET /note/:id/history/:historyId
For getting content of the note history record
Create service methods
checkContentDifference()
/note
request, we should check that content changes are enough to save the new version of the content into historyN
, then we add a new record with the content of the note intopublic.notes_history
table and update the note inpublic.notes
tablegetNoteHistoryByNoteId()
In this method we should return only additional info of note history (id, user_id, updated_at) that info will be displayed in web part
getHistoryRecordById()
In this method we need to return full record with content (this method will be used for preview of the history record)
Create
NoteHistoryRepository
andNoteHistoryStorage
Here we must provide data for the correct operation of the service methods
The text was updated successfully, but these errors were encountered: