(function () { | |
angular.module('mCord') | |
.service('Imsi', function($resource, $q, $http, baseUrl){ | |
const r = $resource(`${baseUrl}api/imsi/:id`, {id: '@id'}, { | |
save: {method: 'PUT'} | |
}); | |
r.prototype.getProfiles = function(){ | |
const d = $q.defer(); | |
$http.get(`${baseUrl}api/imsi/${this.eNBId}/profile`) | |
.then(res => { | |
d.resolve(res.data); | |
}) | |
.catch(err => { | |
d.reject(err) | |
}); | |
return d.promise; | |
}; | |
return r; | |
}) | |
})(); |