From 99fd76c0af94993b55b6a24b20fae3d84fc7ddee Mon Sep 17 00:00:00 2001 From: Anton Franzluebbers Date: Wed, 20 Oct 2021 03:30:07 -0400 Subject: [PATCH] update api url to workers --- website/api.html | 2 +- website/index.html | 6 +++--- website/pair.html | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/website/api.html b/website/api.html index a5b251b..a18c9d5 100644 --- a/website/api.html +++ b/website/api.html @@ -10,7 +10,7 @@ primary-color = "#bc1f2d" show-header = "false" show-info = "true" - spec-url = "http://3.141.15.55/api/api_spec.json" + spec-url = "https://sparkling-dream-4e86.vel.workers.dev/api/api_spec.json" default-schema-tab = 'example' > diff --git a/website/index.html b/website/index.html index 62eef68..0bf4eae 100644 --- a/website/index.html +++ b/website/index.html @@ -144,7 +144,7 @@ loading.style.display = "none"; if (hw_id != "") { - httpGetAsync('http://3.141.15.55/api/get_state/' + hw_id, (resp) => { + httpGetAsync('https://sparkling-dream-4e86.vel.workers.dev/api/get_state/' + hw_id, (resp) => { console.log(resp); let respData = JSON.parse(resp); @@ -165,14 +165,14 @@ }); function setUserData(endpoint, data) { - httpPostAsync('http://3.141.15.55/api/set_headset_details/' + hw_id + '/' + endpoint, + httpPostAsync('https://sparkling-dream-4e86.vel.workers.dev/api/set_headset_details/' + hw_id + '/' + endpoint, data, (resp) => {console.log('success');}, (status) => {console.log('fail');} ); } function setRoomData(endpoint, data) { - httpPostAsync('http://3.141.15.55/api/set_room_details/' + current_room.value + '/' + endpoint, + httpPostAsync('https://sparkling-dream-4e86.vel.workers.dev/api/set_room_details/' + current_room.value + '/' + endpoint, data, (resp) => {console.log('success');}, (status) => {console.log('fail');} diff --git a/website/pair.html b/website/pair.html index 5122684..8151507 100644 --- a/website/pair.html +++ b/website/pair.html @@ -74,7 +74,7 @@ let submit_button = document.getElementById('submit_pairing_code'); let pair_code_input = document.getElementById('pair_code'); submit_button.addEventListener('click', () => { - httpGetAsync('http://3.141.15.55/api/pair_headset/' + pair_code_input.value, (resp) => { + httpGetAsync('https://sparkling-dream-4e86.vel.workers.dev/api/pair_headset/' + pair_code_input.value, (resp) => { console.log(resp); let respData = JSON.parse(resp); if (respData['hw_id'] != '') {