|
|
|
|
@ -58,9 +58,21 @@ export class SetupComponent implements OnInit {
@@ -58,9 +58,21 @@ export class SetupComponent implements OnInit {
|
|
|
|
|
}; |
|
|
|
|
this.toasterService.popAsync(toast); |
|
|
|
|
this.router.navigate(['/']); |
|
|
|
|
} else { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.providerId = qParams.providerId; |
|
|
|
|
this.token = qParams.token; |
|
|
|
|
|
|
|
|
|
// Check if provider exists, redirect if it does
|
|
|
|
|
try { |
|
|
|
|
const provider = await this.apiService.getProvider(this.providerId); |
|
|
|
|
if (provider.name != null) { |
|
|
|
|
this.router.navigate(['/providers', provider.id], { replaceUrl: true }); |
|
|
|
|
} |
|
|
|
|
} catch (e) { |
|
|
|
|
this.validationService.showError(e); |
|
|
|
|
this.router.navigate(['/']); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|