(function () { "use strict"; angular .module('codeAPLEBOX.client.models.auth') .factory('User', UserResource); /* @ngInject */ function UserResource($http, appConfig, $location) { // var apiBaseUrl = appConfig.APIBaseURL+":"+appConfig.APIBasePort; // var baseURL_Employee = apiBaseUrl + '/api/APLEBOX/employee/'; // var baseURL_Customer = apiBaseUrl + '/api/APLEBOX/customer/'; const apiBaseUrl = $location.$$protocol + '://' + $location.$$host+":"+$location.$$port; const baseURL_Employee = apiBaseUrl + '/api/APLEBOX/EMPLOYEE/'; const baseURL_Customer = apiBaseUrl + '/api/APLEBOX/CUSTOMER/'; return { certifiedPassword: function (param){ return $http.post('/api/auth/local/certifiedPassword', param); }, login: function (param){ return $http.post('/api/auth/local', param); }, login_customer: function (param){ return $http.post('/api/auth/local/customer', param); }, removeLoginIp: function (param){ return $http.post(baseURL_Employee + 'removeLoginIp', param); }, getMe: function (param){ return $http.post(baseURL_Employee + 'getMe'); }, getMe_Customer: function (param){ return $http.post(baseURL_Customer + 'getMe_Customer'); }, }; } })();