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:
parent
5c8db2a873
commit
0d9400965d
10 changed files with 106 additions and 268 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue