Various fixes
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
})();
|
Reference in New Issue
Block a user