service.js 480 Bytes
angular.module('focaHojaRuta')
    .service('hojaRutaService', ['$http', 'API_ENDPOINT', function($http, API_ENDPOINT) {
        var route = API_ENDPOINT.URL;
        return {
            getHojaRuta: function(chofer) {
                return $http.get(route + '/hoja-ruta/chofer/' + chofer);
            },
            terminarHojaRuta: function(hojaRuta) {
                return $http.post(route + '/hoja-ruta/terminar',{hojaRuta: hojaRuta});
            }
        };
    }]);