diff --git a/server/mocks/measurements.js b/server/mocks/measurements.js index 42f1c1d..e48e35b 100644 --- a/server/mocks/measurements.js +++ b/server/mocks/measurements.js @@ -105,7 +105,7 @@ module.exports = function(app) { id: 8, strain: 2, characteristic: 'Characteristic 3', - textMeasurementType: 'Meas. Type 1', + textMeasurementType: null, txtValue: "text value", numValue: null, confidenceInterval: null, @@ -157,16 +157,16 @@ module.exports = function(app) { measurementsRouter.get('/:id', function(req, res) { var measurements = MEASUREMENTS.filter(function(m) { - return req.params.id.indexOf(m.id.toString()) > -1; + return m.id == req.params.id; }); res.send({ - 'measurement': measurements[0] + 'measurement': measurements }); }); measurementsRouter.put('/:id', function(req, res) { var measurements = MEASUREMENTS.filter(function(m) { - return req.params.id.indexOf(m.id.toString()) > -1; + return m.id == req.params.id; }); res.send({ 'measurement': measurements[0] diff --git a/server/mocks/strains.js b/server/mocks/strains.js index 84ae778..6313886 100644 --- a/server/mocks/strains.js +++ b/server/mocks/strains.js @@ -73,7 +73,7 @@ module.exports = function(app) { strainsRouter.get('/:id', function(req, res) { var strains = STRAINS.filter(function(s) { - return req.params.id.indexOf(s.id.toString()) > -1; + return s.id == req.params.id; }); res.send({ 'strain': strains[0] @@ -82,7 +82,7 @@ module.exports = function(app) { strainsRouter.put('/:id', function(req, res) { var strains = STRAINS.filter(function(s) { - return req.params.id.indexOf(s.id.toString()) > -1; + return s.id == req.params.id; }); res.send({ 'strain': strains[0]