diff --git a/client/src/app/services/sas-viya.service.ts b/client/src/app/services/sas-viya.service.ts index c81e1e4..2f6721b 100644 --- a/client/src/app/services/sas-viya.service.ts +++ b/client/src/app/services/sas-viya.service.ts @@ -62,14 +62,24 @@ export class SasViyaService { private http: HttpClient, private appStoreService: AppStoreService ) { + + } + + /** + * This function is replacing the constructor. + * The reason for this is timing issues, other services eg. sas.service, app-store.service + * must be initialized before this bit of code is executed. + * This function is being called by `sas.service` + */ + setup() { const adapterConfig = this.appStoreService.getDcAdapterSettings() this.serverUrl = adapterConfig?.serverUrl || '' - //example - this.getByCollection('jobs').subscribe((res) => { - console.log('res', res) - }) + //example collection request + // this.getByCollection('jobs').subscribe((res) => { + // console.log('res', res) + // }) } /** diff --git a/client/src/app/services/sas.service.ts b/client/src/app/services/sas.service.ts index c071d96..afbbb89 100644 --- a/client/src/app/services/sas.service.ts +++ b/client/src/app/services/sas.service.ts @@ -55,6 +55,7 @@ export class SasService { this.dcAdapterSettings = this.appStoreService.getDcAdapterSettings() this.sasjsService.setup() + this.sasViyaService.setup() if (!this.dcAdapterSettings) { this.eventService.showInfoModal(