Commit 40f18e63961aa963b8b449cf764ba9d99330f967
1 parent
9d6b18e7ba
Exists in
master
and in
1 other branch
code review
Showing
2 changed files
with
3 additions
and
3 deletions
 
Show diff stats
src/js/controller.js
src/js/service.js
| 1 | 1 | angular.module('focaHojaRuta') | 
| 2 | - .service('hojaRutaService', ['$http', 'API_ENDPOINT', function($http, API_ENDPOINT) { | |
| 2 | + .factory('hojaRutaService', ['$http', 'API_ENDPOINT', function($http, API_ENDPOINT) { | |
| 3 | 3 | var route = API_ENDPOINT.URL; | 
| 4 | 4 | return { | 
| 5 | 5 | getHojaRuta: function(chofer) { | 
| 6 | 6 | return $http.get(route + '/hoja-ruta/chofer/' + chofer); | 
| 7 | 7 | }, | 
| 8 | 8 | terminarHojaRuta: function(hojaRuta) { | 
| 9 | - return $http.post(route + '/hoja-ruta/terminar',{hojaRuta: hojaRuta}); | |
| 9 | + return $http.post(route + '/hoja-ruta/terminar', {hojaRuta: hojaRuta}); | |
| 10 | 10 | } | 
| 11 | 11 | }; | 
| 12 | 12 | }]); |