mirror of
https://github.com/oceanprotocol/webtasks
synced 2025-01-08 13:02:53 +01:00
endpoint to get count of all bounties
This commit is contained in:
parent
476ddcfb56
commit
4da6165842
@ -49,4 +49,17 @@ server.get('/', async (req, res) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
server.get('/all', async (req, res) => {
|
||||||
|
try {
|
||||||
|
const response = await axios.get('https://api.bounties.network/bounty/?search=ocean%20protocol')
|
||||||
|
|
||||||
|
const allBounties = response.data
|
||||||
|
const data = { count: allBounties.count }
|
||||||
|
|
||||||
|
res.send(data)
|
||||||
|
} catch (error) {
|
||||||
|
res.send(error)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
module.exports = webtask.fromExpress(server)
|
module.exports = webtask.fromExpress(server)
|
||||||
|
Loading…
Reference in New Issue
Block a user