fix(console): navigate to users list after removal (#5095)

Redirects the user back to the user list after a user is deleted
This commit is contained in:
Max Peintner
2023-01-25 14:51:35 +01:00
committed by GitHub
parent c54ddc71a2
commit fd4f1dd016

View File

@@ -371,8 +371,9 @@ export class UserDetailComponent implements OnInit {
.then(() => { .then(() => {
const params: Params = { const params: Params = {
deferredReload: true, deferredReload: true,
type: this.user.human ? 'humans' : 'machines',
}; };
this.router.navigate(['/users/list', this.user.human ? 'humans' : 'machines'], { queryParams: params }); this.router.navigate(['/users'], { queryParams: params });
this.toast.showInfo('USER.TOAST.DELETED', true); this.toast.showInfo('USER.TOAST.DELETED', true);
}) })
.catch((error) => { .catch((error) => {