changing chart lib
This commit is contained in:
@@ -57,6 +57,21 @@ router.get('/coin/:id', function (req, res) {
|
||||
})
|
||||
})
|
||||
|
||||
router.get('/coin/:id/chart', function (req, res) {
|
||||
let id = req.params['id'];
|
||||
let url = config.coingecko.api_url + '/coins/' + id + '/market_chart?vs_currency=usd&days=max';
|
||||
console.log("chart url:", url)
|
||||
api_helper.REMOTE_API_call(url)
|
||||
.then(response => {
|
||||
res.json(response);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log("error: ", error);
|
||||
res.send(error);
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user