From 618d712106046747cbccb9d344d41b4ed76449ef Mon Sep 17 00:00:00 2001 From: dlohvinov Date: Fri, 15 Dec 2023 13:38:44 +0200 Subject: [PATCH] 23.12.118: process env fix [WTEL-3984] --- package.json | 2 +- src/api/axios/generateInstance.js | 2 +- src/modules/FilesExport/scripts/generateMediaURL.js | 2 +- src/modules/Userinfo/components/the-auth.vue | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 08f5a5f8..6f1993f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@webitel/ui-sdk", - "version": "23.12.117", + "version": "23.12.118", "private": false, "scripts": { "dev": "vite", diff --git a/src/api/axios/generateInstance.js b/src/api/axios/generateInstance.js index a6e1fdef..ac9df417 100644 --- a/src/api/axios/generateInstance.js +++ b/src/api/axios/generateInstance.js @@ -3,7 +3,7 @@ import axios from 'axios'; // 'X-Webitel-Access' ~ 'X-Access-Token' const generateInstance = ({ interceptors } = {}) => { const instance = axios.create({ - baseURL: process ? process.env.VUE_APP_API_URL : import.meta.env.VITE_API_URL, + baseURL: process?.env?.VUE_APP_API_URL || import.meta.env.VITE_API_URL, headers: { 'X-Webitel-Access': localStorage.getItem('access-token') || '', }, diff --git a/src/modules/FilesExport/scripts/generateMediaURL.js b/src/modules/FilesExport/scripts/generateMediaURL.js index e0348509..80efc64d 100644 --- a/src/modules/FilesExport/scripts/generateMediaURL.js +++ b/src/modules/FilesExport/scripts/generateMediaURL.js @@ -1,6 +1,6 @@ const generateMediaURL = (id) => { const token = localStorage.getItem('access-token'); - const BASE_URL = process ? process.env.VUE_APP_API_URL : import.meta.env.VITE_API_URL; + const BASE_URL = process?.env?.VUE_APP_API_URL || import.meta.env.VITE_API_URL; return `${BASE_URL}/storage/recordings/${id}/stream?access_token=${token}`; }; diff --git a/src/modules/Userinfo/components/the-auth.vue b/src/modules/Userinfo/components/the-auth.vue index 6ad41167..0ced94cf 100644 --- a/src/modules/Userinfo/components/the-auth.vue +++ b/src/modules/Userinfo/components/the-auth.vue @@ -19,7 +19,7 @@