@eohjsc/react-native-smart-city 0.4.52 → 0.4.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eohjsc/react-native-smart-city",
3
3
  "title": "React Native Smart Home",
4
- "version": "0.4.52",
4
+ "version": "0.4.53",
5
5
  "description": "TODO",
6
6
  "main": "index.js",
7
7
  "files": [
@@ -100,8 +100,6 @@ const SCDefaultConfig = {
100
100
  intervalWatchConfigTime: 30000,
101
101
  setCurrentSensorDisplay: () => {},
102
102
  appName: 'E-Ra',
103
- packageName: 'com.eohjsc.eohmobile.staging',
104
- versionCode: 1
105
103
  };
106
104
 
107
105
  export class SCConfig {
@@ -119,12 +117,15 @@ export class SCConfig {
119
117
  static intervalWatchConfigTime = SCDefaultConfig.intervalWatchConfigTime;
120
118
  static setCurrentSensorDisplay = SCDefaultConfig.setCurrentSensorDisplay;
121
119
  static appName = SCDefaultConfig.appName;
122
- static packageName = SCDefaultConfig.packageName;
123
- static versionCode = SCDefaultConfig.versionCode;
124
120
  }
125
121
 
126
122
  export const initSCConfig = (config) => {
127
123
  api.setBaseURL(config.apiRoot ?? SCDefaultConfig.apiRoot);
124
+ api.setHeaders({
125
+ 'Content-Type': 'application/json',
126
+ 'App-Version-Code': config.versionCode,
127
+ 'App-Package-Name': config.packageName,
128
+ });
128
129
  LocaleConfig.defaultLocale = config.language ?? SCConfig.language;
129
130
  SCConfig.ENV = config.ENV ?? SCConfig.ENV;
130
131
  SCConfig.language = config.language ?? SCConfig.language;
@@ -147,6 +148,4 @@ export const initSCConfig = (config) => {
147
148
  SCConfig.setCurrentSensorDisplay =
148
149
  config.setCurrentSensorDisplay ?? SCDefaultConfig.setCurrentSensorDisplay;
149
150
  SCConfig.appName = config.appName ?? SCDefaultConfig.appName;
150
- SCConfig.packageName = config.packageName ?? SCConfig.packageName;
151
- SCConfig.versionCode = config.version ?? SCConfig.versionCode;
152
151
  };
@@ -11,8 +11,6 @@ import { isHTML } from '../Validation';
11
11
  const api = create({
12
12
  headers: {
13
13
  'Content-Type': 'application/json',
14
- 'App-Version-Code': SCConfig.versionCode,
15
- 'App-Package-Name': SCConfig.packageName,
16
14
  },
17
15
  timeout: 30000,
18
16
  });