details info query working
This commit is contained in:
@@ -27,7 +27,7 @@ router.get('/coins/markets', function (req, res) {
|
||||
})
|
||||
|
||||
|
||||
router.get('/coins/count', function (req, res) {
|
||||
router.get('/count', function (req, res) {
|
||||
let url = config.coingecko.api_url + '/global';
|
||||
// console.log("url: ", url);
|
||||
|
||||
@@ -41,4 +41,25 @@ router.get('/coins/count', function (req, res) {
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
router.get('/coin/:id', function (req, res) {
|
||||
let id = req.params['id'];
|
||||
let url = config.coingecko.api_url + '/coins/' + id;
|
||||
console.log("id: ", id);
|
||||
|
||||
api_helper.REMOTE_API_call(url)
|
||||
.then(response => {
|
||||
res.json(response);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log("error: ", error);
|
||||
res.send(error);
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
module.exports = router;
|
||||
|
||||
Reference in New Issue
Block a user