reverse proxy
This commit is contained in:
@ -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];
|
||||
|
Reference in New Issue
Block a user