1
0
mirror of https://github.com/Foltik/Shimapan synced 2024-09-21 19:28:40 -04:00
shimapan/public/js/services/ApiSvc.js

21 lines
540 B
JavaScript
Raw Normal View History

2017-10-18 13:31:08 -04:00
angular.module('ApiSvc', []).service('ApiService', ['$http', '$window', function ($http, $window) {
this.getKey = function (identifier, cb) {
$http({
method: 'GET',
url: '/api/keys/get',
params: {identifier: identifier}
}).then(function (res) {
cb(res.data);
});
};
this.getAll = function (cb) {
$http({
method: 'GET',
url: '/api/keys/get'
}).then(function (res) {
cb(res.data);
});
};
}]);