mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-04 21:32:15 +00:00
fix(console): delete provider, refactor add and update methods (#5515)
fix: provider deletion
This commit is contained in:
@@ -142,31 +142,17 @@ export class IdpTableComponent implements OnInit {
|
||||
|
||||
dialogRef.afterClosed().subscribe((resp) => {
|
||||
if (resp) {
|
||||
if (this.serviceType === PolicyComponentServiceType.MGMT) {
|
||||
(this.service as ManagementService).removeOrgIDP(idp.id).then(
|
||||
() => {
|
||||
this.toast.showInfo('IDP.TOAST.DELETED', true);
|
||||
setTimeout(() => {
|
||||
this.refreshPage();
|
||||
}, 1000);
|
||||
},
|
||||
(error) => {
|
||||
this.toast.showError(error);
|
||||
},
|
||||
);
|
||||
} else {
|
||||
(this.service as AdminService).removeIDP(idp.id).then(
|
||||
() => {
|
||||
this.toast.showInfo('IDP.TOAST.DELETED', true);
|
||||
setTimeout(() => {
|
||||
this.refreshPage();
|
||||
}, 1000);
|
||||
},
|
||||
(error) => {
|
||||
this.toast.showError(error);
|
||||
},
|
||||
);
|
||||
}
|
||||
this.service.deleteProvider(idp.id).then(
|
||||
() => {
|
||||
this.toast.showInfo('IDP.TOAST.DELETED', true);
|
||||
setTimeout(() => {
|
||||
this.refreshPage();
|
||||
}, 1000);
|
||||
},
|
||||
(error) => {
|
||||
this.toast.showError(error);
|
||||
},
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user