Remove trailing whitespace

This commit is contained in:
Andrew Stewart 2014-02-27 14:14:33 -08:00
parent f6fda0efbc
commit 204bf89685
2 changed files with 12 additions and 12 deletions

View File

@ -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 = {};

View File

@ -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];