- Aggiornato i vari .ENV
This commit is contained in:
@@ -25,14 +25,14 @@ export const axiosInstance: AxiosInstance = axios.create({
|
||||
axiosInstance.interceptors.response.use(
|
||||
|
||||
(response) => {
|
||||
if (import.meta.env.DEBUGGING === '1') console.log(response)
|
||||
if (import.meta.env.VITE_DEBUG === '1') console.log(response)
|
||||
return response
|
||||
},
|
||||
(error) => {
|
||||
const globalStore = useGlobalStore()
|
||||
// console.log('error', error)
|
||||
if (error.response) {
|
||||
if (import.meta.env.DEBUGGING === '1') console.log('Status = ', error.response.status)
|
||||
if (import.meta.env.VITE_DEBUG === '1') console.log('Status = ', error.response.status)
|
||||
console.log('Request Error: ', error.response)
|
||||
if (error.response.status !== 0) {
|
||||
globalStore.setStateConnection('online')
|
||||
|
||||
@@ -77,7 +77,7 @@ export const Api = {
|
||||
},
|
||||
|
||||
async checkSession({ token, refresh_token }: any) {
|
||||
return axios.post(import.meta.env.API_URL + Paths.TOKEN_REFRESH, {
|
||||
return axios.post(import.meta.env.VITE_API_URL + Paths.TOKEN_REFRESH, {
|
||||
refresh_token,
|
||||
}, {
|
||||
headers: {
|
||||
|
||||
@@ -2253,7 +2253,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
try {
|
||||
let myserv = import.meta.env.VITE_MONGODB_HOST!
|
||||
|
||||
if (!import.meta.env.DEBUGGING) {
|
||||
if (!import.meta.env.VITE_DEBUG) {
|
||||
if (tools.isTest()) {
|
||||
if (this.site && this.site.host_testapi) {
|
||||
myserv = this.site.host_testapi
|
||||
|
||||
Reference in New Issue
Block a user