26 lines
1.0 KiB
JavaScript
26 lines
1.0 KiB
JavaScript
"use strict";
|
|
(function () {
|
|
'use strict';
|
|
angular.module('myitsmApp')
|
|
.service('gainsightService', ['$http', '$modal', function ($http, $modal) {
|
|
this.getTelemetryConfiguration = function () {
|
|
return $http.get('/smartit/rest/analytics/gainsight/configuration/com.bmc.dsm.itsm-applications')
|
|
.then(function (response) {
|
|
return response.data;
|
|
});
|
|
};
|
|
this.getUserPreference = function () {
|
|
return $http.get('/smartit/rest/analytics/gainsight/user/preferences')
|
|
.then(function (response) {
|
|
return response.data;
|
|
});
|
|
};
|
|
this.setUserPreference = function (userPreferences) {
|
|
return $http.post('/smartit/rest/analytics/gainsight/user/preferences', userPreferences)
|
|
.then(function (response) {
|
|
return response.data;
|
|
});
|
|
};
|
|
}]);
|
|
})();
|