got rid of console.logs
This commit is contained in:
parent
8ee87b88e9
commit
171e8fd458
8 changed files with 14 additions and 44 deletions
|
@ -11,18 +11,14 @@ onmessage = (event) => {
|
|||
}
|
||||
}
|
||||
|
||||
console.log('starting get loop');
|
||||
|
||||
const fetchData = () => {
|
||||
console.log(accesstoken);
|
||||
|
||||
|
||||
const apiURL = "http://localhost:5000/interstellar_ai/api/ai_get?access_token=" + accesstoken
|
||||
|
||||
axios.get(apiURL)
|
||||
.then(response => {
|
||||
const data = response.data
|
||||
console.log(data);
|
||||
postMessage(data)
|
||||
setTimeout(fetchData, 100)
|
||||
})
|
||||
|
|
|
@ -12,15 +12,10 @@ onmessage = (e) => {
|
|||
api_key: api_key
|
||||
}
|
||||
|
||||
console.log(Message);
|
||||
|
||||
|
||||
axios.post("http://localhost:5000/interstellar_ai/api/ai_send", Message)
|
||||
.then(response => {
|
||||
const status = response.data.status
|
||||
console.log(status);
|
||||
postMessage({ status })
|
||||
console.log('message posted');
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue