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:
19
frontend/src/utils/sdoc-server-api.js
Normal file
19
frontend/src/utils/sdoc-server-api.js
Normal 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;
|
Reference in New Issue
Block a user