1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-03 07:55:36 +00:00

Md copy view (#6598)

* duplicate md view

* optimize code

* optimize code

* Update metadata_manage.py

* Update metadata_manage.py

---------

Co-authored-by: 孙永强 <11704063+s-yongqiang@user.noreply.gitee.com>
Co-authored-by: r350178982 <32759763+r350178982@users.noreply.github.com>
This commit is contained in:
awu0403
2024-08-28 16:06:47 +08:00
committed by GitHub
parent 055a6c7814
commit 99c58486f7
7 changed files with 97 additions and 4 deletions

View File

@@ -118,6 +118,12 @@ class MetadataManagerAPI {
return this._sendPostRequest(url, params, { headers: { 'Content-type': 'application/json' } });
};
duplicateView = (repoID, viewId) => {
const url = this.server + '/api/v2.1/repos/' + repoID + '/metadata/duplicate-view/';
const params = { view_id: viewId };
return this._sendPostRequest(url, params, { headers: { 'Content-type': 'application/json' } });
};
modifyView = (repoID, viewId, viewData) => {
const url = this.server + '/api/v2.1/repos/' + repoID + '/metadata/views/';
const params = {