Browse Source

Use new API endpoint

new-api
Luke Childs 6 years ago
parent
commit
bd4a52387c
  1. 2
      src/calculate-bias.js
  2. 2
      src/get-data.js

2
src/calculate-bias.js

@ -15,7 +15,7 @@ const calculateBias = data => {
// Create correctly ordered array of currency objects
let currencies = [];
for (const symbol of SUPPORTED_CURRENCIES) {
const currency = data.clusters.find(cluster => cluster.abbr === symbol);
const currency = data.data.score.find(cluster => cluster.abbr === symbol);
if (currency) {
currencies.push({

2
src/get-data.js

@ -1,7 +1,7 @@
const dataCache = new Map();
const getData = async userId => {
const url = `https://hive.one/api/top-people/${userId}`;
const url = `https://hive.one/api/influencers/scores/person/id/${userId}/`;
const cachedData = dataCache.get(url);
if (typeof cachedData !== 'undefined') {

Loading…
Cancel
Save