Various fixes

This commit is contained in:
Reynaldo Reyes
2016-05-20 23:00:34 -04:00
parent b220f21065
commit 48e8b73111
55 changed files with 714 additions and 690 deletions

View File

@@ -10,11 +10,34 @@
.value('profesorSeleccionado',{})
.value('data',{});
professors.$inject = ['$resource','$rootScope'];
function professors($resource, $rootScope){
return $resource('http://'+$rootScope.domainUrl+'/professors/:id', null,
{
'update': {method:'PUT'}
professors.$inject = ['$resource','$rootScope','authentication'];
function professors($resource, $rootScope, authentication){
return $resource('http://'+$rootScope.domainUrl+'/professors/:id', {}, {
get: {
method: 'GET',
headers: {
Authorization: 'Bearer '+ authentication.getToken()
}
},
update: {
method: 'PUT',
headers: {
Authorization: 'Bearer '+ authentication.getToken()
}
},
delete: {
method: 'DELETE',
headers: {
Authorization: 'Bearer '+ authentication.getToken()
}
},
query: {
method: 'GET',
isArray:true,
headers: {
Authorization: 'Bearer '+ authentication.getToken()
}
}
});
};
})();