1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-10 11:21:29 +00:00

12.0 change sdoc content (#6121)

* fix warnings in 12.0

* get wiki sdoc content from sdoc server

* optimize code

* change page search params

* Add repo_name for wiki name

---------

Co-authored-by: ‘JoinTyang’ <yangtong1009@163.com>
This commit is contained in:
Michael An
2024-05-29 11:51:52 +08:00
committed by GitHub
parent b76bad303a
commit 96aa207802
9 changed files with 177 additions and 58 deletions

View File

@@ -0,0 +1,19 @@
import axios from 'axios';
class SDocServerApi {
constructor(options) {
this.server = options.sdocServer;
this.docUuid = options.docUuid;
this.accessToken = options.accessToken;
}
getDocContent() {
const { server, docUuid, accessToken } = this;
const url = `${server}/api/v1/docs/${docUuid}/`;
return axios.get(url, { headers: { Authorization: `Token ${accessToken}` } });
}
}
export default SDocServerApi;