whitelabel-db 1.1.70 → 1.1.72

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.
@@ -21,6 +21,7 @@ const liteapiv3_1 = require("../libs/liteapiv3");
21
21
  const Booking_1 = require("./Booking");
22
22
  const clients = {};
23
23
  const clientV3 = {};
24
+ const defaultLiteApiEnvironment = process.env.COPILOT_ENVIRONMENT_NAME === 'production' ? 'production' : 'dev';
24
25
  let Project = class Project extends sequelize_typescript_1.Model {
25
26
  generateSession(secret) {
26
27
  return jsonwebtoken_1.default.sign({ id: this.id }, secret, {
@@ -50,7 +51,7 @@ let Project = class Project extends sequelize_typescript_1.Model {
50
51
  if (!key || !key.length) {
51
52
  key = process.env.LITEAPI_KEY;
52
53
  }
53
- const environment = this.settings.liteApiEnvironment || 'production';
54
+ const environment = this.settings.liteApiEnvironment || defaultLiteApiEnvironment;
54
55
  if (!clientV3[key]) {
55
56
  clientV3[key] = new liteapiv3_1.LiteApiClientV3(key, environment);
56
57
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whitelabel-db",
3
- "version": "1.1.70",
3
+ "version": "1.1.72",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",