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

get dir_id from headers

This commit is contained in:
wangjianhui
2018-12-13 11:15:20 +08:00
parent d6aa80c72e
commit c0651fbf5f
4 changed files with 8 additions and 12 deletions

View File

@@ -74,13 +74,13 @@ class DirView extends React.Component {
let repoID = this.state.repoID;
this.setState({isDirentListLoading: true});
seafileAPI.listDir(repoID, filePath).then(res => {
let direntList = res.data.data.map(item => {
let direntList = res.data.map(item => {
return new Dirent(item);
});
this.setState({
isDirentListLoading: false,
direntList: direntList,
dirID: res.data.oid,
dirID: res.headers.oid,
});
}).catch(() => {
this.setState({pathExist: false});