diff --git a/README.md b/README.md index b4b8bad..127ec6a 100644 --- a/README.md +++ b/README.md @@ -29,9 +29,7 @@ Endpoint: [`https://oceanprotocol-community.now.sh`](https://oceanprotocol-commu "followers": 1000 }, "bounties": { - "gitcoin": 1000, - "bountiesNetwork": 1000, - "total": 1000 + "gitcoin": 1000 }, "twitter": { "followers": 1000 @@ -51,7 +49,7 @@ Endpoint: [`https://oceanprotocol-community.now.sh`](https://oceanprotocol-commu Install dependencies: ```bash -npm install -g now +npm install -g vercel npm install ``` diff --git a/networks/bounties.js b/networks/bounties.js index 9fe5513..378e0ac 100644 --- a/networks/bounties.js +++ b/networks/bounties.js @@ -14,49 +14,17 @@ const getGitcoin = async () => { return gitcoin.length } -const getBountiesNetwork = async () => { - const response = await fetch('https://api.bounties.network/bounty/?search=ocean%20protocol&bountyStage=1&platform=bounties-network') - - if (response.status !== 200) { - logError(`Non-200 response code from Bounties Network: ${response.status}`) - return null - } - - const bountiesNetwork = await response.json() - - return bountiesNetwork.results.length -} - -const getTotal = async () => { - const response = await fetch('https://api.bounties.network/bounty/?search=ocean%20protocol') - - if (response.status !== 200) { - logError(`Non-200 response code from Bounties Network: ${response.status}`) - return null - } - - const allBounties = await response.json() - - return allBounties.count -} - const fetchBounties = async () => { const start = Date.now() const gitcoin = await getGitcoin() - const bountiesNetwork = await getBountiesNetwork() - const total = await getTotal() log( 'Re-built bounties cache. ' + - `Total: ${total} bounties. ` + + `Total: ${gitcoin} bounties. ` + `Elapsed: ${new Date() - start}ms` ) - return { - gitcoin, - bountiesNetwork, - total - } + return { gitcoin } } module.exports = fetchBounties diff --git a/package.json b/package.json index 4271ff9..ab6e1ac 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "main": "index.js", "scripts": { - "start": "now dev", + "start": "vercel dev", "test": "eslint --ignore-path .gitignore --ext .js,.jsx ." }, "dependencies": { diff --git a/now.json b/vercel.json similarity index 100% rename from now.json rename to vercel.json