js/controllers/robot_commands_ctrl.js in robeaux-0.1.1 vs js/controllers/robot_commands_ctrl.js in robeaux-0.2.0
- old
+ new
@@ -5,11 +5,10 @@
$scope.isDisabled = function() {
return ($scope.command === "")
};
$scope.addParam = function(last) {
- console.log("HEY");
if (!last) { return; }
$scope.robot.params.push({ name: '', value: '', type: 'string' });
};
$scope.removeParam = function(index) {
@@ -20,10 +19,10 @@
$scope.submit = function() {
var robot = $scope.robot.name,
command = $scope.command,
params = parseParams($scope.robot.params);
- var url ='/robots/' + robot + "/commands/" + command;
+ var url ='/api/robots/' + robot + "/commands/" + command;
$http.post(url, params).success(function(data) {
if (data.result) {
if ($scope.robot.results.length > 4) { $scope.robot.results.pop(); }
$scope.robot.results.unshift(data);