From f7cab6aec0333c097820ab2b8ab349b12a963bea Mon Sep 17 00:00:00 2001 From: YasinOnm08 Date: Fri, 20 Sep 2024 10:54:21 +0200 Subject: [PATCH] repush --- app/ProcessAPI.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/ProcessAPI.js b/app/ProcessAPI.js index a1f3a6d..d02861b 100644 --- a/app/ProcessAPI.js +++ b/app/ProcessAPI.js @@ -11,9 +11,14 @@ onmessage = function (e) { }; const getResponse = () => { + messageComplete:boolean = false + while(!messageComplete) axios.get('https://localhost:5000/interstellar/api/ai_get?access_token=' + access_token) .then(Response => { postMessage(Response.data.response) + if (Response.data.status == 200) { + messageComplete = true + } }).catch(error => { console.error("Error with GET response request:", error) })