Browse Source

Feature/improve Ghostfolio data provider status check (#4735)

* Improve Ghostfolio data provider status check
pull/4732/head
Thomas Kaul 1 month ago
committed by GitHub
parent
commit
6e67520b68
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 12
      apps/client/src/app/components/admin-settings/admin-settings.component.ts

12
apps/client/src/app/components/admin-settings/admin-settings.component.ts

@ -146,10 +146,13 @@ export class AdminSettingsComponent implements OnDestroy, OnInit {
this.dataSource = new MatTableDataSource(filteredProviders); this.dataSource = new MatTableDataSource(filteredProviders);
const ghostfolioApiKey = settings[
PROPERTY_API_KEY_GHOSTFOLIO
] as string;
if (ghostfolioApiKey) {
this.adminService this.adminService
.fetchGhostfolioDataProviderStatus( .fetchGhostfolioDataProviderStatus(ghostfolioApiKey)
settings[PROPERTY_API_KEY_GHOSTFOLIO] as string
)
.pipe( .pipe(
catchError(() => { catchError(() => {
this.isGhostfolioApiKeyValid = false; this.isGhostfolioApiKeyValid = false;
@ -169,6 +172,9 @@ export class AdminSettingsComponent implements OnDestroy, OnInit {
this.changeDetectorRef.markForCheck(); this.changeDetectorRef.markForCheck();
}); });
} else {
this.isGhostfolioApiKeyValid = false;
}
this.isLoading = false; this.isLoading = false;

Loading…
Cancel
Save