tidying db functions
This commit is contained in:
@ -24,7 +24,6 @@ async function fetch_history() {
|
||||
const response = await fetch(`${currentUrl}app/datahistory`);
|
||||
const rawData = await response.json();
|
||||
var dateFormat = d3.timeParse("%a, %d %b %Y %H:%M:%S GMT");
|
||||
console.log(rawData)
|
||||
// SELECT uuid, quantity, discount_percentage, price, currency, h_timestamp
|
||||
let historyData = rawData.map(d => ({
|
||||
uuid: d[0],
|
||||
@ -32,7 +31,6 @@ async function fetch_history() {
|
||||
currency: d[4],
|
||||
date: dateFormat(d[5]),
|
||||
}));
|
||||
console.log(historyData)
|
||||
return historyData;
|
||||
} catch (error) {
|
||||
console.error('Error fetching data history: ', error);
|
||||
|
Reference in New Issue
Block a user