blob: 57c382754052c80591b69cd3a347c9803338f700 [file] [log] [blame]
Matteo Scandoloeccf4972016-06-13 11:32:05 -07001(function () {
2 angular.module('mCord')
3 .service('Imsi', function($resource, $q, $http, baseUrl){
4 const r = $resource(`${baseUrl}api/imsi/:id`, {id: '@id'}, {
5 save: {method: 'PUT'}
6 });
7
8 r.prototype.getProfiles = function(){
9 const d = $q.defer();
10
11 $http.get(`${baseUrl}api/imsi/${this.eNBId}/profile`)
12 .then(res => {
13 d.resolve(res.data);
14 })
15 .catch(err => {
16 d.reject(err)
17 });
18
19 return d.promise;
20 };
21
22 return r;
23 })
24})();