Created
January 11, 2017 16:47
-
-
Save fedorovsky/74ade61f8f9f403761094b5f593e50c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('myModule') | |
.service('UserService', ['$rootScope', '$http', '$log', '$localStorage', 'API_URL', function($rootScope, $http, $log, $localStorage, API_URL) { | |
/** | |
* GET USERS | |
*/ | |
this.getUsers = () => { | |
let URL = API_URL.GET_USERS; | |
let _data = { | |
api_token: $localStorage.apiToken, | |
lang: $rootScope.lang, | |
web: true, | |
}; | |
return $http.post(URL, _data).then((response) => { | |
return response.data.data.users; | |
}); | |
}; | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment