Commit 68db7c41 authored by Severine Duvaud's avatar Severine Duvaud
Browse files

Fixed issue with empty datasets + added request and mongodb to package.json

parent 0c6f7d58
......@@ -8,7 +8,7 @@ info.getDatasetsFromArrayMap(function (callback){
infoObject = callback;
});
var infoObject = {};
var infoObject = {message : "loading datasets from arraymap api, please refresh the page in a few seconds..."};
function checkDatasetIdentifier(params) {
......
......@@ -7,10 +7,11 @@ var url = "http://arraymap.org/api/?db=arraymap&api_out=icdmlist&api_out=icdmlis
module.exports = {
getDatasetsFromArrayMap: function(callback) {
var object = {};
var object;
request(url, function (error, response, body) {
if (!error && response.statusCode == 200) {
object = getDatasets(JSON.parse(body));
console.log(object)
callback(object);
}
else {
......
......@@ -17,7 +17,9 @@
"monk": "^1.0.1",
"morgan": "~1.6.1",
"serve-favicon": "~2.3.0",
"underscore": "^1.8.3"
"underscore": "^1.8.3",
"request": "^2.74.0",
"mongodb": "^2.2.4"
},
"devDependencies": {
"mocha": "^3.0.2",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment