/**
* Created by cklimkowsky on 2/25/15.
*/
angular
.module('coopEval')
.service('employerService', employerService);
function employerService($http) {
var urlBase = 'services';
this.getPlacementData = function () {
return $http.get(urlBase + '/EvaluationService/getEmployerOverview');
};
this.login = function (credentials) {
return $http({
method: 'POST',
url: urlBase + '/AuthenticationService/authenticateEmployer',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
transformRequest: function (obj) {
var str = [];
for (var p in obj)
str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p]));
return str.join("&");
},
data: credentials
})
}
} |