From 204bf89685bbec8d1e46a8eb5f6c038f1ae4aaea Mon Sep 17 00:00:00 2001 From: Andrew Stewart Date: Thu, 27 Feb 2014 14:14:33 -0800 Subject: [PATCH] Remove trailing whitespace --- lib/adaptor.js | 2 +- lib/api.js | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/adaptor.js b/lib/adaptor.js index 939972a..1f90248 100644 --- a/lib/adaptor.js +++ b/lib/adaptor.js @@ -24,7 +24,7 @@ namespace("Cylon", function() { // name - name of the Adaptor, used when printing to console // connection - Connection the adaptor will use to proxy commands/events // - // Returns a new Adaptor + // Returns a new Adaptor function Adaptor(opts) { if (opts == null) { opts = {}; diff --git a/lib/api.js b/lib/api.js index e147582..fe904cb 100644 --- a/lib/api.js +++ b/lib/api.js @@ -72,19 +72,19 @@ namespace("Cylon", function() { return _results; })()); }); - + this.server.get("/robots/:robotname", function(req, res) { return master.findRobot(req.params.robotname, function(err, robot) { return res.json(err ? err : robot.data()); }); }); - + this.server.get("/robots/:robotname/commands", function(req, res) { return master.findRobot(req.params.robotname, function(err, robot) { return res.json(err ? err : robot.data().commands); }); }); - + this.server.all("/robots/:robotname/commands/:commandname", function(req, res) { var params; params = _this.parseCommandParams(req); @@ -99,13 +99,13 @@ namespace("Cylon", function() { }); }); }); - + this.server.get("/robots/:robotname/devices", function(req, res) { return master.findRobot(req.params.robotname, function(err, robot) { return res.json(err ? err : robot.data().devices); }); }); - + this.server.get("/robots/:robotname/devices/:devicename", function(req, res) { var devicename, robotname, _ref; _ref = [req.params.robotname, req.params.devicename], robotname = _ref[0], devicename = _ref[1]; @@ -113,7 +113,7 @@ namespace("Cylon", function() { return res.json(err ? err : device.data()); }); }); - + this.server.get("/robots/:robotname/devices/:devicename/commands", function(req, res) { var devicename, robotname, _ref; _ref = [req.params.robotname, req.params.devicename], robotname = _ref[0], devicename = _ref[1]; @@ -121,7 +121,7 @@ namespace("Cylon", function() { return res.json(err ? err : device.data().commands); }); }); - + this.server.all("/robots/:robot/devices/:device/commands/:commandname", function(req, res) { var commandname, devicename, params, robotname; params = [req.params.robot, req.params.device, req.params.commandname]; @@ -138,13 +138,13 @@ namespace("Cylon", function() { }); }); }); - + this.server.get("/robots/:robotname/connections", function(req, res) { return master.findRobot(req.params.robotname, function(err, robot) { return res.json(err ? err : robot.data().connections); }); }); - + this.server.get("/robots/:robot/connections/:connection", function(req, res) { var connectionname, robotname, _ref; _ref = [req.params.robot, req.params.connection], robotname = _ref[0], connectionname = _ref[1]; @@ -152,11 +152,11 @@ namespace("Cylon", function() { return res.json(err ? err : connection.data()); }); }); - + this.server.get("/robots/:robotname/devices/:devicename/events", function(req, res) { return req.io.route('events'); }); - + return this.server.io.route('events', function(req) { var devicename, robotname, _ref; _ref = [req.params.robotname, req.params.devicename], robotname = _ref[0], devicename = _ref[1];