Firmware: Remove unnecessary promises

From the firmware functions in api-utils.js, don't create a new
promise.

Tested: Changed Priority, deleted, and activated images.
Change-Id: I53e4def6dda2e1868f65ccd365510cd84d01a065
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/app/common/services/api-utils.js b/app/common/services/api-utils.js
index 0de6b1f..89b2c71 100644
--- a/app/common/services/api-utils.js
+++ b/app/common/services/api-utils.js
@@ -1349,71 +1349,44 @@
           return deferred.promise;
         },
         changePriority: function(imageId, priority) {
-          var deferred = $q.defer();
-          $http({
-            method: 'PUT',
-            url: DataService.getHost() + '/xyz/openbmc_project/software/' +
-                imageId + '/attr/Priority',
-            withCredentials: true,
-            data: JSON.stringify({'data': priority})
-          })
-              .then(
-                  function(response) {
-                    var json = JSON.stringify(response.data);
-                    var content = JSON.parse(json);
-                    deferred.resolve(content);
-                  },
-                  function(error) {
-                    console.log(error);
-                    deferred.reject(error);
-                  });
-
-          return deferred.promise;
+          return $http({
+                   method: 'PUT',
+                   url: DataService.getHost() +
+                       '/xyz/openbmc_project/software/' + imageId +
+                       '/attr/Priority',
+                   withCredentials: true,
+                   data: JSON.stringify({'data': priority})
+                 })
+              .then(function(response) {
+                return response.data;
+              });
         },
         deleteImage: function(imageId) {
-          var deferred = $q.defer();
-          $http({
-            method: 'POST',
-            url: DataService.getHost() + '/xyz/openbmc_project/software/' +
-                imageId + '/action/Delete',
-            withCredentials: true,
-            data: JSON.stringify({'data': []})
-          })
-              .then(
-                  function(response) {
-                    var json = JSON.stringify(response.data);
-                    var content = JSON.parse(json);
-                    deferred.resolve(content);
-                  },
-                  function(error) {
-                    console.log(error);
-                    deferred.reject(error);
-                  });
-
-          return deferred.promise;
+          return $http({
+                   method: 'POST',
+                   url: DataService.getHost() +
+                       '/xyz/openbmc_project/software/' + imageId +
+                       '/action/Delete',
+                   withCredentials: true,
+                   data: JSON.stringify({'data': []})
+                 })
+              .then(function(response) {
+                return response.data;
+              });
         },
         activateImage: function(imageId) {
-          var deferred = $q.defer();
-          $http({
-            method: 'PUT',
-            url: DataService.getHost() + '/xyz/openbmc_project/software/' +
-                imageId + '/attr/RequestedActivation',
-            withCredentials: true,
-            data:
-                JSON.stringify({'data': Constants.FIRMWARE.ACTIVATE_FIRMWARE})
-          })
-              .then(
-                  function(response) {
-                    var json = JSON.stringify(response.data);
-                    var content = JSON.parse(json);
-                    deferred.resolve(content);
-                  },
-                  function(error) {
-                    console.log(error);
-                    deferred.reject(error);
-                  });
-
-          return deferred.promise;
+          return $http({
+                   method: 'PUT',
+                   url: DataService.getHost() +
+                       '/xyz/openbmc_project/software/' + imageId +
+                       '/attr/RequestedActivation',
+                   withCredentials: true,
+                   data: JSON.stringify(
+                       {'data': Constants.FIRMWARE.ACTIVATE_FIRMWARE})
+                 })
+              .then(function(response) {
+                return response.data;
+              });
         },
         uploadImage: function(file) {
           return $http({