@smartico/public-api 0.0.238 → 0.0.239

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": "@smartico/public-api",
3
- "version": "0.0.238",
3
+ "version": "0.0.239",
4
4
  "description": "Smartico public API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -244,8 +244,8 @@ class SmarticoAPI {
244
244
  public static getAvatarUrl(label_api_key: string): string {
245
245
  const envId = SmarticoAPI.getEnvDnsSuffix(label_api_key);
246
246
  const avatarUrl = AVATAR_DOMAIN.replace('{ENV_ID}', SmarticoAPI.getEnvDnsSuffix(label_api_key));
247
-
248
- if (envId === '4') {
247
+ const envs = ['4', '5', '6', '7'];
248
+ if (envs.includes(envId)) {
249
249
  return SmarticoAPI.replaceSmrDomainsWithCloudfront(avatarUrl);
250
250
  } else {
251
251
  return avatarUrl;
@@ -267,8 +267,9 @@ class SmarticoAPI {
267
267
  const timeStart = new Date().getTime();
268
268
  result = await this.messageSender(message, this.publicUrl, expectCID);
269
269
  const timeEnd = new Date().getTime();
270
+ const envs = ['4', '5', '6', '7'];
270
271
 
271
- if (SmarticoAPI.getEnvDnsSuffix(this.label_api_key) === '4' && result) {
272
+ if (envs.includes(SmarticoAPI.getEnvDnsSuffix(this.label_api_key)) && result) {
272
273
  result = SmarticoAPI.replaceSmrDomainsWithCloudfront(result);
273
274
  }
274
275