mirror of
https://github.com/Foltik/Shimapan
synced 2024-11-11 07:54:55 -05:00
21 lines
540 B
JavaScript
21 lines
540 B
JavaScript
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);
|
|
});
|
|
};
|
|
}]);
|