mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-11 03:41:12 +00:00
20 lines
444 B
JavaScript
20 lines
444 B
JavaScript
![]() |
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;
|