From 64699fa365df4b7f5890b29fcca201f920a9f4f7 Mon Sep 17 00:00:00 2001 From: "andrea.terzani" Date: Mon, 24 Mar 2025 11:08:34 +0100 Subject: [PATCH] Rimuovi il codice commentato e aggiorna gli endpoint API per rimuovere "/hermone" dall'URL di backend --- src/components/ChatClient.vue | 36 ++++------------------------------- 1 file changed, 4 insertions(+), 32 deletions(-) diff --git a/src/components/ChatClient.vue b/src/components/ChatClient.vue index 30353c4..577de98 100644 --- a/src/components/ChatClient.vue +++ b/src/components/ChatClient.vue @@ -20,35 +20,7 @@ - - @@ -126,7 +98,7 @@ export default { return; } try { - const response = await fetch(`https://olympus-api-gateway.olympus-wizardai.com/chatservice/get-history?conversationId=${this.conversationId}&lastN=100`, { + const response = await fetch(`${import.meta.env.VITE_BACKEND_URL.remove("/hermone")}/chatservice/get-history?conversationId=${this.conversationId}&lastN=100`, { method: 'GET', headers: { 'Content-Type': 'application/json', authorization: 'Bearer ' + this.$auth.token() } }); @@ -171,7 +143,7 @@ export default { try { this.waitingData = true; - const response = await fetch(import.meta.env.VITE_BACKEND_URL+'/chatservice/chat', { + const response = await fetch(import.meta.env.VITE_BACKEND_URL.remove("/hermone")+'/chatservice/chat', { method: 'POST', headers: { 'Content-Type': 'application/json', authorization: this.authorization }, body: JSON.stringify(payload) @@ -233,7 +205,7 @@ export default { async clearHistory() { try { - const response = await fetch( import.meta.env.VITE_BACKEND_URL+`/chatservice/delete-history?conversationId=${this.conversationId}`, { + const response = await fetch( `${import.meta.env.VITE_BACKEND_URL.remove("/hermone")}/chatservice/delete-history?conversationId=${this.conversationId}`, { method: 'DELETE', headers: { 'Content-Type': 'application/json', authorization: this.authorization } }); @@ -249,7 +221,7 @@ export default { async loadContext() { try { - const response = await fetch(`${import.meta.env.VITE_BACKEND_URL}/chatservice/load-context-to-conversation?conversationId=${this.conversationId}&scenarioExecutionId=${this.scenarioExecutionId}`, { + const response = await fetch(`${import.meta.env.VITE_BACKEND_URL.remove("/hermone")}/chatservice/load-context-to-conversation?conversationId=${this.conversationId}&scenarioExecutionId=${this.scenarioExecutionId}`, { method: 'GET', headers: { 'Content-Type': 'application/json', authorization: this.authorization } });