Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.flatMap(res => {
operateChanges(operMessage, OperationState.success);
return Observable.of(res);
}); })
.catch(error => {
.flatMap(res => {
operateChanges(operMessage, OperationState.failure, res);
return Observable.of(res);
}); })
.catch(error => Observable.of(error.status));
let GroupAdders$ = this.selectedGroups.map(group => {
let operMessage = new OperateInfo();
operMessage.name = 'OPERATION.ADD_GROUP';
operMessage.data.id = group.id;
operMessage.state = OperationState.progressing;
operMessage.data.name = group.group_name;
this.operationService.publishInfo(operMessage);
return this.memberService
.addGroupMember(this.projectId, group, this.selectedRole)
.flatMap(response => {
return this.translateService.get("BATCH.DELETED_SUCCESS")
.flatMap(res => {
operateChanges(operMessage, OperationState.success);
return Observable.of(res);
}); })
.catch(error => {
return this.translateService.get("BATCH.DELETED_FAILURE")
.flatMap(res => {
let GroupAdders$ = this.selectedGroups.map(group => {
let operMessage = new OperateInfo();
operMessage.name = 'OPERATION.ADD_GROUP';
operMessage.data.id = group.id;
operMessage.state = OperationState.progressing;
operMessage.data.name = group.group_name;
this.operationService.publishInfo(operMessage);
return this.memberService
.addGroupMember(this.projectId, group, this.selectedRole)
.flatMap(response => {
return this.translateService.get("BATCH.DELETED_SUCCESS")
.flatMap(res => {
operateChanges(operMessage, OperationState.success);
return Observable.of(res);
}); })
.catch(error => {
return this.translateService.get("BATCH.DELETED_FAILURE")
.flatMap(res => {
operateChanges(operMessage, OperationState.failure, res);
return Observable.of(res);
}); })