xy il y a 7 ans
Parent
commit
8d046eda0e
1 fichiers modifiés avec 9 ajouts et 9 suppressions
  1. 9 9
      src/app/common/manage/TencentResult.js

+ 9 - 9
src/app/common/manage/TencentResult.js

@@ -286,6 +286,7 @@ class DeletePathSpan extends Component {
                                   axios.get(`${removeAPI}`, {
                                       params: {
                                           'cloud-id': `${_this.props.cloudID}`,
+                                          'group-id': `${_this.props.groupID}`,
                                           'api-id': `${_this.props.path.id}`
                                       }
                                   })
@@ -295,16 +296,15 @@ class DeletePathSpan extends Component {
 
                                               console.log('path id', _this.props.path.id, 'user id', _this.props.userID);
 
-                                              if(_this.props.path.id && _this.props.userID) {
-                                                  delete_apiGWPath(_this.props.path.id, _this.props.userID);
+                                              delete_apiGWPath({variables: {id:_this.props.path.id, user_id: _this.props.userID}});
+
+                                              // 写回 project 状态
+                                              request(graphqlUrl, UPDATE_PROJECT_ONLY_STATUS, {
+                                                  id: this.props.projectID,
+                                                  updatedAt: new Date().getTime(),
+                                                  projectStatus: 'grouped'
+                                              });
 
-                                                  // 写回 project 状态
-                                                  request(graphqlUrl, UPDATE_PROJECT_ONLY_STATUS, {
-                                                      id: this.props.projectID,
-                                                      updatedAt: new Date().getTime(),
-                                                      projectStatus: 'grouped'
-                                                  });
-                                              }
                                               console.log(res.data);
                                           } else {
                                               console.log('error');