aggiornamenti su PCB

This commit is contained in:
Surya Paolo
2024-10-22 15:27:00 +02:00
parent 335f5c6529
commit 54410ef5c9
291 changed files with 359 additions and 3289 deletions

View File

@@ -2053,24 +2053,30 @@ export const useGlobalStore = defineStore('GlobalStore', {
getServerHost() {
let myserv = ''
// myserv = window.location.host
try {
let myserv = process.env.MONGODB_HOST!
if (process.env.DEBUGGING) {
myserv = process.env.MONGODB_HOST! // 'http://192.168.1.54:3000'
} else {
myserv = process.env.MONGODB_HOST!
}
if (!process.env.DEBUGGING) {
if (tools.isTest()) {
if (this.site && this.site.host_testapi) {
myserv = this.site.host_testapi
// console.log('getServerHost TEST API', myserv)
}
} else {
if (this.site && this.site.host_api) {
myserv = this.site.host_api
// console.log('getServerHost API', myserv)
}
}
}
if (!myserv) {
// if (this.serverHost) {
// myserv = this.serverHost
// } else {
// myserv = process.env.MONGODB_HOST!
// }
}
// console.log('getServerHost', myserv)
return myserv
return myserv
} catch (e) {
return process.env.MONGODB_HOST
}
},
@@ -2259,7 +2265,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
},
async loadLastMovements(nummov: number) {
return Api.SendReq('/users/lastmovs', 'POST', {nummov})
return Api.SendReq('/users/lastmovs', 'POST', { nummov })
.then((res) => {
if (res.data && res.data.last_transactions && this.datastat) {
this.datastat.last_transactions = res.data.last_transactions