1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-05 00:43:53 +00:00

Add delete-tag-dialog callback function (#3164)

* fix-bug

* update
This commit is contained in:
Michael An
2019-03-25 15:23:37 +08:00
committed by Daniel Pan
parent 34cf1eaa37
commit 8cf07d4b1b
5 changed files with 26 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ const propTypes = {
currentTag: PropTypes.object,
repoID: PropTypes.string.isRequired,
toggleCancel: PropTypes.func.isRequired,
onDeleteRepoTag: PropTypes.func.isRequired,
onClose: PropTypes.func.isRequired
};
@@ -65,8 +66,11 @@ class UpdateTagDialog extends React.Component {
onDeleteTag = () => {
let tag = this.props.currentTag;
let repoID = this.props.repoID;
seafileAPI.deleteRepoTag(repoID, tag.id).then(() => {
seafileAPI.deleteRepoTag(repoID, tag.id).then((res) => {
this.props.toggleCancel();
if (res.data.success === "true") {
this.props.onDeleteRepoTag(tag.id);
}
});
}