 	data = req.body
 	req.sensor.createMeasure data, (err, measure) ->
 		if err
-			res.send error: "Server error while creating measure.", 500
+			res.send error: 'Server error while creating measure.', 500
 		else
 			res.send measure, 201
 

	data = req.body
	Sensor.createIfDriver data, sensorsDrivers, (err, sensor) ->
		if err?
			# @todo Special case when error is 'Device already added'?
			res.send error: "Server error while creating sensor.", 500
		else
			res.send sensor, 201


	data = req.body
	req.sensor.updateAttributesForDBAndDriver data, sensorsDrivers, (err, sensor) ->
		if err?
			res.send error: 'Server error while saving sensor', 500
		else
			res.send sensor, 200

module.exports.delete = (req, res) ->
	req.sensor.destroyFromDBAndDriver sensorsDrivers, (err) ->
		if err?
			res.send error: 'Server error while deleting sensor', 500
		else
			res.send success: true, 200
