Aggiorna gli endpoint API per utilizzare l'URL di backend configurato

This commit is contained in:
andrea.terzani
2025-03-24 10:28:40 +01:00
parent 6126c364e0
commit 0f61b993ba

View File

@@ -126,7 +126,7 @@ export default {
return;
}
try {
const response = await fetch(`http://olympus-api-gateway-aks.olympusai.live/chatservice/get-history?conversationId=${this.conversationId}&lastN=100`, {
const response = await fetch(`https://olympus-api-gateway.olympus-wizardai.com/chatservice/get-history?conversationId=${this.conversationId}&lastN=100`, {
method: 'GET',
headers: { 'Content-Type': 'application/json', authorization: 'Bearer ' + this.$auth.token() }
});
@@ -171,7 +171,7 @@ export default {
try {
this.waitingData = true;
const response = await fetch('http://olympus-api-gateway-aks.olympusai.live/chatservice/chat', {
const response = await fetch(import.meta.env.VITE_BACKEND_URL+'/chatservice/chat', {
method: 'POST',
headers: { 'Content-Type': 'application/json', authorization: this.authorization },
body: JSON.stringify(payload)
@@ -233,7 +233,7 @@ export default {
async clearHistory() {
try {
const response = await fetch(`http://olympus-api-gateway-aks.olympusai.live/chatservice/delete-history?conversationId=${this.conversationId}`, {
const response = await fetch( import.meta.env.VITE_BACKEND_URL+`/chatservice/delete-history?conversationId=${this.conversationId}`, {
method: 'DELETE',
headers: { 'Content-Type': 'application/json', authorization: this.authorization }
});
@@ -249,7 +249,7 @@ export default {
async loadContext() {
try {
const response = await fetch(`http://olympus-api-gateway-aks.olympusai.live/chatservice/load-context-to-conversation?conversationId=${this.conversationId}&scenarioExecutionId=${this.scenarioExecutionId}`, {
const response = await fetch(import.meta.env.VITE_BACKEND_URL+`/chatservice/load-context-to-conversation?conversationId=${this.conversationId}&scenarioExecutionId=${this.scenarioExecutionId}`, {
method: 'GET',
headers: { 'Content-Type': 'application/json', authorization: this.authorization }
});