bugfixing

This commit is contained in:
MuslemRahimi 2024-09-10 18:27:21 +02:00
parent b5f70d0b58
commit 0eae54c27f

View File

@ -716,7 +716,7 @@ async function initializePrice() {
}
async function exportPriceData(timePeriod: string) {
async function exportPriceData(timePeriod: string) {
const cachedData = getCache($etfTicker, "exportPriceData" + timePeriod);
if (cachedData) {
@ -748,6 +748,13 @@ async function exportData(timePeriod:string) {
let exportList = [];
if(timePeriod === '1day') {
exportList = await exportPriceData(timePeriod);
exportList = exportList?.map(({ time, open, high, low, close }) => ({
date: time,
open,
high,
low,
close,
}));
} else if (data?.user?.tier === 'Pro') {
exportList = await exportPriceData(timePeriod);