Browse Source

Improve directory structure

pull/15/head
Luke Childs 5 years ago
parent
commit
a27eaf39bb
  1. 2
      api/coins.js
  2. 7
      api/data.js
  3. 2
      api/nicehash.js
  4. 0
      api/util/send-json.js

2
api/coins/coins.js → api/coins.js

@ -1,5 +1,5 @@
const fetch = require('isomorphic-fetch');
const sendJson = require('../send-json');
const sendJson = require('./util/send-json');
const getData = async endpoint => fetch(
`https://whattomine.com/${endpoint}.json`

7
api/data/data.js → api/data.js

@ -1,7 +1,6 @@
const sendJson = require('../send-json');
const getNiceHashData = require('../nicehash/nicehash');
const getCoinData = require('../coins/coins');
const sendJson = require('./util/send-json');
const getNiceHashData = require('./nicehash');
const getCoinData = require('./coins');
const getData = async () => {
const [nicehashAlgorithms, coins] = await Promise.all([

2
api/nicehash/nicehash.js → api/nicehash.js

@ -1,5 +1,5 @@
const fetch = require('isomorphic-fetch');
const sendJson = require('../send-json');
const sendJson = require('./util/send-json');
const SECONDS = 1;
const MINUTES = SECONDS * 60;

0
api/send-json.js → api/util/send-json.js

Loading…
Cancel
Save