1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-06 09:34:00 +00:00
seahub/frontend/src/utils/seafile-api.js
shanshuirenjia c0d645962f Optimized code structure (#2430)
* combine utils file

* modify file position
2018-10-09 10:56:59 +08:00

10 lines
283 B
JavaScript

import cookie from 'react-cookies';
import { SeafileAPI } from 'seafile-js';
import { siteRoot } from './constants';
let seafileAPI = new SeafileAPI();
let xcsrfHeaders = cookie.load('sfcsrftoken');
seafileAPI.initForSeahubUsage({ siteRoot, xcsrfHeaders });
export { seafileAPI };