Skip to content

Commit

Permalink
Adding callback to our api url
Browse files Browse the repository at this point in the history
  • Loading branch information
vitor-costa committed Dec 8, 2014
1 parent 5346e8b commit abb49af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion public/relatorioCodigo.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ window.onload = function() {
else {
initialDate = moment(initialDate,"DD/MM/YYYY - HH").format("YYYYMMDDHH");
finalDate = moment(finalDate,"DD/MM/YYYY - HH").format("YYYYMMDDHH");
url = "http://localhost:3002/api/" + initialDate + "/" + finalDate;
url = "http://localhost:3002/api/" + initialDate + "/" + finalDate + "?callback=?";
}
}

Expand Down
2 changes: 1 addition & 1 deletion report.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ app.get('/api/:min_date/:max_date', function (req, res) {
};
response += "]";

res.send(response);
res.jsonp(JSON.parse(response));

})

Expand Down

0 comments on commit abb49af

Please sign in to comment.