Use test API when running as test instance
This commit is contained in:
@ -11,14 +11,21 @@ import {ModalService} from '@inst-iot/bosch-angular-ui-components';
|
||||
})
|
||||
export class ApiService {
|
||||
|
||||
private host = isDevMode() ? '/api' : 'https://definma-api.apps.de1.bosch-iot-cloud.com';
|
||||
private host: string;
|
||||
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private storage: LocalStorageService,
|
||||
private modalService: ModalService,
|
||||
private window: Window
|
||||
) { }
|
||||
) {
|
||||
if(isDevMode())
|
||||
this.host = '/api';
|
||||
else if(window.location.hostname === 'definma-test.apps.de1.bosch-iot-cloud.com')
|
||||
this.host = 'https://definma-api-test.apps.de1.bosch-iot-cloud.com';
|
||||
else
|
||||
this.host = 'https://definma-api.apps.de1.bosch-iot-cloud.com';
|
||||
}
|
||||
|
||||
get hostName() {
|
||||
return this.host;
|
||||
|
Reference in New Issue
Block a user