reverse proxy

This commit is contained in:
2024-01-30 00:28:04 +01:00
parent e7a6dc5cd8
commit 4894eae14f
4 changed files with 21 additions and 3 deletions

View File

@ -13,7 +13,6 @@ const width = window.innerWidth - margin.right - margin.left -10;
// url
const currentUrl = window.location.href;
console.log(currentUrl);
// reload page when window is resized
@ -22,7 +21,7 @@ window.onresize = function(){ location.reload(); }
async function fetch_history() {
try {
const response = await fetch(`${currentUrl}/datahistory`);
const response = await fetch(`${currentUrl}app/datahistory`);
const rawData = await response.json();
// SELECT uuid, quantity, discount_percentage, price, currency, h_timestamp
let historyData = rawData.map(d => ({
@ -41,7 +40,7 @@ async function fetch_history() {
async function fetch_item() {
try {
// SELECT uuid, itemid, skuid, choice, attributes, image
const response = await fetch(`${currentUrl}/dataitem`);
const response = await fetch(`${currentUrl}app/dataitem`);
const rawData = await response.json();
const items = rawData.reduce((item, row) => {
const uuid = row[0];