1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-06-19 20:03:03 +00:00
seahub/frontend/src/utils/seafile-api.js

10 lines
295 B
JavaScript
Raw Normal View History

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