wowtoken.app

git clone https://git.emily.sh/wowtoken-app/wowtoken.app.git
Log | Files | Refs | README | LICENSE

commit 0d59dc046d34792609a08300418b65173ee50a3e
parent 1bc79ab74bdb8ecbbf8fd838c49e43732e08695e
Author: Emily Doherty <git@emily.sh>
Date:   Sun, 27 Nov 2022 16:30:02 -0800

Update 30 day selection to source from Dynamo

Diffstat:
Msrc/index.html | 3++-
Msrc/index.js | 4++--
2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/index.html b/src/index.html @@ -31,10 +31,11 @@ <option value="72h">3 Days</option> <option value="168h">7 Days</option> <option value="336h">14 Days</option> - <option value="30d">1 Month</option> + <option value="720h">1 Month</option> <option value="90d">3 Months</option> <option value="6m">6 Months</option> <option value="1y">1 Year</option> + <option value="2y">2 Years</option> <option value="all">All Available</option> </select> </div> diff --git a/src/index.js b/src/index.js @@ -116,7 +116,7 @@ export function updateTimePreference(newTime) { } async function pullChartData() { - let resp = await fetch("https://data.wowtoken.app/token/history/" + current_region_selection + "/" + current_time_selection + ".json"); + let resp = await fetch("https://data.wowtoken.app/next/token/history/" + current_region_selection + "/" + current_time_selection + ".json"); let chart_data = await resp.json(); let new_chart_js_data = [] for (let i = 0; i < chart_data.length; i++) { @@ -151,7 +151,7 @@ function detectURLQuery() { // In the future, we will allow all the times to be selected, // once I come up with a good reduction algorithm. // For larger time selections, it's currently hardcoded into the backend - const allowedTimes = ['72h', '167h', '336h', '30d', '90d', '1y', '6m', 'all'] + const allowedTimes = ['72h', '167h', '336h', '720h', '30d', '90d', '1y', '6m', 'all'] if (urlSearchParams.has('time')) { if (allowedTimes.includes(urlSearchParams.get('time').toLowerCase())) { current_time_selection = urlSearchParams.get('time').toLowerCase()