@seafile/sdoc-editor 0.2.5-beta → 0.2.5-beta2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api/seafile-api.js
CHANGED
|
@@ -10,10 +10,10 @@ var SeafileAPI = /*#__PURE__*/function () {
|
|
|
10
10
|
return _this.req.delete(url);
|
|
11
11
|
};
|
|
12
12
|
this.deleteSdocOtherRevision = function (docUuid, revisionId) {
|
|
13
|
-
var url = 'api/v2.1/seadoc/delete-revision/' + docUuid + '/';
|
|
14
|
-
|
|
15
|
-
formData.append('revision_id', revisionId);
|
|
16
|
-
return _this.req.delete(url
|
|
13
|
+
var url = 'api/v2.1/seadoc/delete-revision/' + docUuid + '/' + revisionId + '/';
|
|
14
|
+
// let formData = new FormData();
|
|
15
|
+
// formData.append('revision_id', revisionId);
|
|
16
|
+
return _this.req.delete(url);
|
|
17
17
|
};
|
|
18
18
|
this.req = axios.create({
|
|
19
19
|
baseURL: server,
|
package/dist/components/doc-operations/revision-operations/revisions/revisions-dialog/index.js
CHANGED
|
@@ -121,6 +121,7 @@ var RevisionsDialog = function RevisionsDialog(_ref) {
|
|
|
121
121
|
setShowDeleteTipDialog(false);
|
|
122
122
|
}, []);
|
|
123
123
|
var deleteOtherRevision = useCallback(function () {
|
|
124
|
+
console.log(revisions);
|
|
124
125
|
var revisionIndex = revisions.findIndex(function (revision) {
|
|
125
126
|
return revision.id === operatingRevisionId;
|
|
126
127
|
});
|
|
@@ -129,7 +130,7 @@ var RevisionsDialog = function RevisionsDialog(_ref) {
|
|
|
129
130
|
return;
|
|
130
131
|
}
|
|
131
132
|
var revision = revisions[revisionIndex];
|
|
132
|
-
context.deleteSdocOtherRevision(revision.
|
|
133
|
+
context.deleteSdocOtherRevision(revision.id).then(function (res) {
|
|
133
134
|
var newRevisions = revisions.slice(0);
|
|
134
135
|
newRevisions.splice(revisionIndex, 1);
|
|
135
136
|
updateRevisionsCount(newRevisions.length);
|