1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-23 15:19:42 +02:00

revision history UI

This commit is contained in:
Harvey Kandola 2017-03-08 17:32:46 +00:00
parent 5c8db2a873
commit 0d9400965d
10 changed files with 106 additions and 268 deletions

View file

@ -790,6 +790,10 @@ func GetDocumentRevisions(w http.ResponseWriter, r *http.Request) {
revisions, _ := p.GetDocumentRevisions(documentID)
if len(revisions) == 0 {
revisions = []entity.Revision{}
}
payload, err := json.Marshal(revisions)
if err != nil {
@ -832,6 +836,10 @@ func GetDocumentPageRevisions(w http.ResponseWriter, r *http.Request) {
revisions, _ := p.GetPageRevisions(pageID)
if len(revisions) == 0 {
revisions = []entity.Revision{}
}
payload, err := json.Marshal(revisions)
if err != nil {