@radhost/server-service-config 3.3.1 → 3.3.2

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@radhost/server-service-config",
3
- "version": "3.3.1",
3
+ "version": "3.3.2",
4
4
  "main": "index.js",
5
5
  "scripts": {},
6
6
  "dependencies": {
@@ -10,5 +10,5 @@
10
10
  "access": "public",
11
11
  "registry": "https://registry.npmjs.org/"
12
12
  },
13
- "gitHead": "31499a68eee6f892ebc404f7aa6c282b2793efc5"
13
+ "gitHead": "1165fa451a851a6abafbdf64dd05a3ed3266524b"
14
14
  }
@@ -1,4 +1,5 @@
1
- exports.getConstConfig = (imConfig) => {
1
+ exports.getConstConfig = () => {
2
+ const imConfig = global.QZ_CONFIG.im;
2
3
  return {
3
4
  imgOptions: {
4
5
  localZip: true,
@@ -2,7 +2,7 @@
2
2
  const { countriesAndStates } = require('qiao-regions');
3
3
 
4
4
  // model
5
- const { config } = require('../model/const-config.js');
5
+ const { getConstConfig } = require('../model/const-config.js');
6
6
  const regions2 = require('../model/regions.json');
7
7
 
8
8
  /**
@@ -26,6 +26,10 @@ exports.constItem = async (req, res) => {
26
26
  return;
27
27
  }
28
28
 
29
+ // config
30
+ const config = getConstConfig();
31
+ delete config.areasBackup;
32
+
29
33
  // areas
30
34
  if (type === 'areas') {
31
35
  res.jsonSuccess('request success', config.areas);
@@ -68,7 +72,8 @@ exports.constItem = async (req, res) => {
68
72
  * @returns
69
73
  */
70
74
  exports.constConfig = async (req, res) => {
71
- // del
75
+ // config
76
+ const config = getConstConfig();
72
77
  delete config.areasBackup;
73
78
 
74
79
  // r