diff --git a/src/app/_helpers/fake-backend.interceptor.ts b/src/app/_helpers/fake-backend.interceptor.ts
index 3074335a..ec12ab9e 100644
--- a/src/app/_helpers/fake-backend.interceptor.ts
+++ b/src/app/_helpers/fake-backend.interceptor.ts
@@ -268,7 +268,7 @@ export const sampleIndexResponse: SCIndexResponse = {
],
},
backend: {
- SCVersion: '1.0.0',
+ SCVersion: '2.0.0',
externalRequestTimeout: 5000,
hiddenTypes: [
SCThingType.DateSeries,
diff --git a/src/app/modules/config/config.provider.spec.ts b/src/app/modules/config/config.provider.spec.ts
index 5569c799..f59dca5b 100644
--- a/src/app/modules/config/config.provider.spec.ts
+++ b/src/app/modules/config/config.provider.spec.ts
@@ -81,7 +81,7 @@ describe('ConfigProvider', () => {
expect(await configProvider.getValue('name')).toEqual(sampleIndexResponse.app.name);
});
- it('should init from storage with remote fails', async () => {
+ it('should init from storage when remote fails', async () => {
storageProviderSpy.has.and.returnValue(Promise.resolve(true));
storageProviderSpy.get.and.returnValue(Promise.resolve(sampleIndexResponse));
spyOn(configProvider.client, 'handshake').and.throwError('');
@@ -122,7 +122,7 @@ describe('ConfigProvider', () => {
} catch (err) {
error = err;
}
- expect(error).toEqual(new WrongConfigVersionInStorage('1.0.0', '0.1.0'));
+ expect(error).toEqual(new WrongConfigVersionInStorage('2.0.0', '0.1.0'));
});
it('should throw error on saved app configuration not available', async () => {
@@ -230,7 +230,7 @@ const sampleIndexResponse: SCIndexResponse = {
],
},
backend: {
- SCVersion: '1.0.0',
+ SCVersion: '2.0.0',
externalRequestTimeout: 5000,
hiddenTypes: [
SCThingType.DateSeries,
diff --git a/src/app/modules/data/data.provider.ts b/src/app/modules/data/data.provider.ts
index b7535042..de7ca641 100644
--- a/src/app/modules/data/data.provider.ts
+++ b/src/app/modules/data/data.provider.ts
@@ -38,11 +38,9 @@ export class DataProvider {
*/
private _storagePrefix = 'stapps.data';
/**
- * TODO
- *
- * @TODO: get backendUrl and appVersion and storagePrefix from config (module)
+ * Version of the app (used for the header in communication with the backend)
*/
- appVersion = '1.0.6';
+ appVersion = environment.backend_version;
/**
* TODO
*/
@@ -58,7 +56,7 @@ export class DataProvider {
/**
* TODO
- *
+ *
* @param stAppsWebHttpClient TODO
* @param storageProvider TODO
*/
diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts
index 5104ffe0..5eda30a6 100644
--- a/src/environments/environment.prod.ts
+++ b/src/environments/environment.prod.ts
@@ -13,8 +13,8 @@
* this program. If not, see .
*/
export const environment = {
- backend_url: 'http://localhost:3000',
- backend_version: '1.0.0',
+ backend_url: 'https://mobile.server.uni-frankfurt.de',
+ backend_version: '2.0.0',
use_fake_backend: false,
production: true,
};
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index 361a420b..d9f74020 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -17,8 +17,8 @@
// `ng build --env=prod` then `environment.prod.ts` will be used instead.
// The list of which env maps to which file can be found in `.angular-cli.json`.
export const environment = {
- backend_url: 'http://localhost:3000',
- backend_version: '1.0.0',
+ backend_url: 'https://mobile.server.uni-frankfurt.de',
+ backend_version: '2.0.0',
use_fake_backend: false,
production: false,
};
diff --git a/src/environments/environment.web.ts b/src/environments/environment.web.ts
index 4d819c6c..9403dafc 100644
--- a/src/environments/environment.web.ts
+++ b/src/environments/environment.web.ts
@@ -13,8 +13,8 @@
* this program. If not, see .
*/
export const environment = {
- backend_url: 'http://localhost:3000',
- backend_version: '1.0.0',
+ backend_url: 'https://mobile.server.uni-frankfurt.de',
+ backend_version: '2.0.0',
use_fake_backend: true,
production: false,
};