diff --git a/frontend/src/components/dialog/share-to-group.js b/frontend/src/components/dialog/share-to-group.js index 58f17b1854..966a0f51f5 100644 --- a/frontend/src/components/dialog/share-to-group.js +++ b/frontend/src/components/dialog/share-to-group.js @@ -178,7 +178,7 @@ class ShareToGroup extends React.Component { } } if (isGroupOwnedRepo) { - seafileAPI.shareGroupOwnedRepoToGroup(repoID, this.state.permission, groups).then(res => { + seafileAPI.shareGroupOwnedRepoToGroup(repoID, this.state.permission, groups, path).then(res => { let errorMsg = []; if (res.data.failed.length > 0) { for (let i = 0 ; i < res.data.failed.length ; i++) { @@ -232,7 +232,7 @@ class ShareToGroup extends React.Component { let path = this.props.itemPath; let repoID = this.props.repoID; if (this.props.isGroupOwnedRepo) { - seafileAPI.deleteGroupOwnedRepoSharedGroupItem(repoID, groupID).then(() => { + seafileAPI.deleteGroupOwnedRepoSharedGroupItem(repoID, groupID, path).then(() => { this.setState({ sharedItems: this.state.sharedItems.filter(item => { return item.group_info.id !== groupID; }) }); @@ -257,7 +257,7 @@ class ShareToGroup extends React.Component { let repoID = this.props.repoID; let groupID = item.group_info.id; if (this.props.isGroupOwnedRepo) { - seafileAPI.modifyGroupOwnedRepoGroupSharedPermission(repoID, permission, groupID).then(() => { + seafileAPI.modifyGroupOwnedRepoGroupSharedPermission(repoID, permission, groupID, path).then(() => { this.updateSharedItems(item, permission); }).catch(error => { let errMessage = Utils.getErrorMsg(error); diff --git a/frontend/src/components/dialog/share-to-user.js b/frontend/src/components/dialog/share-to-user.js index 5054848c4c..b019e67f2d 100644 --- a/frontend/src/components/dialog/share-to-user.js +++ b/frontend/src/components/dialog/share-to-user.js @@ -149,7 +149,7 @@ class ShareToUser extends React.Component { } } if (this.props.isGroupOwnedRepo) { - seafileAPI.shareGroupOwnedRepoToUser(repoID, this.state.permission, users).then(res => { + seafileAPI.shareGroupOwnedRepoToUser(repoID, this.state.permission, users, path).then(res => { let errorMsg = []; if (res.data.failed.length > 0) { for (let i = 0 ; i < res.data.failed.length ; i++) { @@ -216,7 +216,7 @@ class ShareToUser extends React.Component { let path = this.props.itemPath; let repoID = this.props.repoID; if (this.props.isGroupOwnedRepo) { - seafileAPI.deleteGroupOwnedRepoSharedUserItem(repoID, username).then(res => { + seafileAPI.deleteGroupOwnedRepoSharedUserItem(repoID, username, path).then(res => { this.setState({ sharedItems: this.state.sharedItems.filter( item => { return item.user_info.name !== username; }) }); @@ -241,7 +241,7 @@ class ShareToUser extends React.Component { let repoID = this.props.repoID; let username = item.user_info.name; if (this.props.isGroupOwnedRepo) { - seafileAPI.modifyGroupOwnedRepoUserSharedPermission(repoID, permission, username).then(() => { + seafileAPI.modifyGroupOwnedRepoUserSharedPermission(repoID, permission, username, path).then(() => { this.updateSharedItems(item, permission); }).catch(error => { let errMessage = Utils.getErrorMsg(error);