Return correct structore on revert
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 17 Dec 2013 16:10:56 +0000 (17:10 +0100)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 12 Aug 2014 09:47:11 +0000 (11:47 +0200)
apps/wiki/views.py

index b88d2df..bd9e2c5 100644 (file)
@@ -216,9 +216,9 @@ def revert(request, chunk_id):
         doc.at_revision(revision).revert(author=author, description=comment)
 
         return JSONResponse({
-            'text': doc.materialize() if before != doc.revision() else None,
+            'document': doc.materialize() if before != doc.revision() else None,
             'meta': {},
-            'revision': doc.revision(),
+            'version': doc.revision(),
         })
     else:
         return JSONFormInvalid(form)