courselit
courselit copied to clipboard
Blog: Automatic save
The blog posts should be automatically saved. All the new changes will be saved in a draft state and will be published, when the user pressed the Publish changes button.
Specs
Model
We will create a new property in Courses model which will store the draft state.
Logic
The frontend will save the data, every 3 seconds if there are updates. The calls should be debounced. On the backend, all the changes are saved to the new property (mentioned in Model section).
When the user presses Publish changes, we will move the data from draft state to the actual property.