Change chart endpoints to use get_json route
This commit is contained in:
parent
ed011152b2
commit
1ef277edc5
|
@ -3,7 +3,7 @@ const myChart = echarts.init(document.getElementById("chart"));
|
||||||
|
|
||||||
async function fetchDataForChart() {
|
async function fetchDataForChart() {
|
||||||
try {
|
try {
|
||||||
const apiEndpoint = "https://api.bitlab21.com/price";
|
const apiEndpoint = "https://api.bitlab21.com/get_json/final__price.json";
|
||||||
const response = await fetch(apiEndpoint);
|
const response = await fetch(apiEndpoint);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error(`HTTP error! status: ${response.status}`);
|
throw new Error(`HTTP error! status: ${response.status}`);
|
||||||
|
|
|
@ -3,7 +3,8 @@ const myChart = echarts.init(document.getElementById("chart"));
|
||||||
|
|
||||||
async function fetchDataForChart() {
|
async function fetchDataForChart() {
|
||||||
try {
|
try {
|
||||||
const apiEndpoint = "https://api.bitlab21.com/feerates";
|
const apiEndpoint =
|
||||||
|
"https://api.bitlab21.com/get_json/final__feerate_percentiles.json";
|
||||||
const response = await fetch(apiEndpoint);
|
const response = await fetch(apiEndpoint);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error(`HTTP error! status: ${response.status}`);
|
throw new Error(`HTTP error! status: ${response.status}`);
|
||||||
|
|
|
@ -3,7 +3,8 @@ const myChart = echarts.init(document.getElementById("chart"));
|
||||||
|
|
||||||
async function fetchDataForChart() {
|
async function fetchDataForChart() {
|
||||||
try {
|
try {
|
||||||
const apiEndpoint = "https://api.bitlab21.com/hashrate";
|
const apiEndpoint =
|
||||||
|
"https://api.bitlab21.com/get_json/final__hashrate.json";
|
||||||
const response = await fetch(apiEndpoint);
|
const response = await fetch(apiEndpoint);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error(`HTTP error! status: ${response.status}`);
|
throw new Error(`HTTP error! status: ${response.status}`);
|
||||||
|
|
|
@ -3,7 +3,8 @@ const myChart = echarts.init(document.getElementById("chart"));
|
||||||
|
|
||||||
async function fetchDataForChart() {
|
async function fetchDataForChart() {
|
||||||
try {
|
try {
|
||||||
const apiEndpoint = "https://api.bitlab21.com/miner_rewards";
|
const apiEndpoint =
|
||||||
|
"https://api.bitlab21.com/get_json/final__miner_rewards.json";
|
||||||
const response = await fetch(apiEndpoint);
|
const response = await fetch(apiEndpoint);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error(`HTTP error! status: ${response.status}`);
|
throw new Error(`HTTP error! status: ${response.status}`);
|
||||||
|
|
Loading…
Reference in New Issue