height is an integer

This commit is contained in:
Manuel Araoz 2015-03-05 17:04:36 -03:00
parent a411db153c
commit d5781a4bc5

View File

@ -32,6 +32,7 @@ Blocks.blockHashParam = function(req, res, next, blockHash) {
Blocks.heightParam = function(req, res, next, height) {
// TODO: fetch block from service
height = parseInt(height);
var block = mockBlocks[Object.keys(mockBlocks)[height]];
if (_.isUndefined(block)) {