1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-29 16:46:30 +00:00

Add restore version (#6515)

* add-restore-version

* update template

* add Permissions

* code normal
This commit is contained in:
yinjianfei-user
2024-08-09 14:45:04 +08:00
committed by GitHub
parent c99e0765aa
commit ffd94856fc
6 changed files with 35 additions and 7 deletions

View File

@@ -14,6 +14,15 @@ class SDocServerApi {
return axios.get(url, { headers: { Authorization: `Token ${accessToken}` } });
}
reloadDocContent(fileName) {
const { server, docUuid, accessToken } = this;
const url = `${server}/api/v1/docs/${docUuid}/replace/`;
const formData = new FormData();
formData.append('doc_uuid', docUuid);
formData.append('doc_name', fileName);
return axios.post(url, formData, { headers: { Authorization: `Token ${accessToken}` } });
}
}
export default SDocServerApi;