types pending
This commit is contained in:
@@ -29,11 +29,11 @@ router.get('/coins/markets', function (req, res) {
|
||||
|
||||
router.get('/count', function (req, res) {
|
||||
let url = config.coingecko.api_url + '/global';
|
||||
// console.log("url: ", url);
|
||||
console.log("url: ", url);
|
||||
|
||||
api_helper.REMOTE_API_call(url)
|
||||
.then(response => {
|
||||
res.json(response.data.active_cryptocurrencies);
|
||||
res.json({'count': response.data.active_cryptocurrencies});
|
||||
})
|
||||
.catch(error => {
|
||||
console.log("error: ", error);
|
||||
@@ -71,8 +71,18 @@ router.get('/coin/:id/chart', function (req, res) {
|
||||
})
|
||||
})
|
||||
|
||||
router.get('/global', function (req, res) {
|
||||
let url = config.coingecko.api_url + '/global';
|
||||
|
||||
|
||||
api_helper.REMOTE_API_call(url)
|
||||
.then(response => {
|
||||
res.json(response.data);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log("error: ", error);
|
||||
res.send(error);
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user