SmartIT_Extensions/BMC/smart-it-full-helix/scripts/app/configuration/ccs/ccs-service.js

23 lines
826 B
JavaScript

"use strict";
(function () {
'use strict';
angular.module('myitsmApp').service('ccsService', ['$resource', function ($resource) {
var resource = $resource('/smartit/rest/ccs/properties', {}, {
getCCSParameters: {
url: '/smartit/rest/ccs/properties',
method: 'GET',
async: false,
isArray: false,
transformResponse: function (data) {
return { results: angular.fromJson(data) };
}
}
});
this.getCCSParameters = function () {
return resource.getCCSParameters().$promise.then(function (data) {
return data.results || [];
});
};
}]);
}());