Browse Source

Improve Ghostfolio data provider status check

pull/4735/head
Thomas Kaul 3 months ago
parent
commit
a72381f317
  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);
const ghostfolioApiKey = settings[
PROPERTY_API_KEY_GHOSTFOLIO
] as string;
if (ghostfolioApiKey) {
this.adminService
.fetchGhostfolioDataProviderStatus(
settings[PROPERTY_API_KEY_GHOSTFOLIO] as string
)
.fetchGhostfolioDataProviderStatus(ghostfolioApiKey)
.pipe(
catchError(() => {
this.isGhostfolioApiKeyValid = false;
@ -169,6 +172,9 @@ export class AdminSettingsComponent implements OnDestroy, OnInit {
this.changeDetectorRef.markForCheck();
});
} else {
this.isGhostfolioApiKeyValid = false;
}
this.isLoading = false;

Loading…
Cancel
Save