Commit d28278facdb8a190168caf7530fdf3bee2321712
Exists in
master
and in
1 other branch
Merge branch 'master' into 'master'
Master(efernandez) See merge request !5
Showing
1 changed file
Show diff stats
src/js/service.js
1 | angular.module('focaAbmVehiculo') | 1 | angular.module('focaAbmVehiculo') |
2 | .factory('focaAbmVehiculoService', ['$http', 'API_ENDPOINT', function($http, API_ENDPOINT) { | 2 | .factory('focaAbmVehiculoService', ['$http', 'API_ENDPOINT', function($http, API_ENDPOINT) { |
3 | return { | 3 | return { |
4 | getVehiculos: function() { | 4 | getVehiculos: function() { |
5 | return $http.get(API_ENDPOINT.URL + '/vehiculo'); | 5 | return $http.get(API_ENDPOINT.URL + '/vehiculo'); |
6 | }, | 6 | }, |
7 | getVehiculo: function(id) { | 7 | getVehiculo: function(id) { |
8 | return $http.get(API_ENDPOINT.URL + '/vehiculo/' + id); | 8 | return $http.get(API_ENDPOINT.URL + '/vehiculo/' + id); |
9 | }, | 9 | }, |
10 | getTransportistas: function() { | 10 | getTransportistas: function() { |
11 | return $http.get(API_ENDPOINT.URL + '/transportista'); | 11 | return $http.get(API_ENDPOINT.URL + '/transportista'); |
12 | }, | 12 | }, |
13 | guerdarVehiculo: function(vehiculo) { | 13 | guerdarVehiculo: function(vehiculo) { |
14 | return $http.post(API_ENDPOINT.URL + '/vehiculo', {vehiculo: vehiculo}); | 14 | return $http.post(API_ENDPOINT.URL + '/vehiculo', {vehiculo: vehiculo}); |
15 | }, | 15 | }, |
16 | deleteVehiculo: function(id) { | 16 | deleteVehiculo: function(id) { |
17 | return $http.delete(API_ENDPOINT.URL + '/vehiculo/' + id); | 17 | return $http.delete(API_ENDPOINT.URL + '/vehiculo/' + id); |
18 | }, | 18 | }, |
19 | getCisternadoPorVehiculo: function(idVehiculo) { | 19 | getCisternadoPorVehiculo: function(idVehiculo) { |
20 | return $http.get(API_ENDPOINT.URL + '/cisterna/listar/' + idVehiculo); | 20 | return $http.get(API_ENDPOINT.URL + '/cisterna/listar/' + idVehiculo); |
21 | }, | 21 | }, |
22 | getCisterna: function(id) { | 22 | getCisterna: function(id) { |
23 | return $http.get(API_ENDPOINT.URL + '/cisterna/' + id); | 23 | return $http.get(API_ENDPOINT.URL + '/cisterna/obtener/' + id); |
24 | }, | 24 | }, |
25 | guardarCisterna: function(cisterna) { | 25 | guardarCisterna: function(cisterna) { |
26 | return $http.post(API_ENDPOINT.URL + '/cisterna/guardar', {cisterna: cisterna}); | 26 | return $http.post(API_ENDPOINT.URL + '/cisterna/guardar', {cisterna: cisterna}); |
27 | }, | 27 | }, |
28 | deleteCisterna: function(id) { | 28 | deleteCisterna: function(id) { |
29 | return $http.delete(API_ENDPOINT.URL + '/cisterna/borrar/' + id); | 29 | return $http.delete(API_ENDPOINT.URL + '/cisterna/borrar/' + id); |
30 | }, | 30 | }, |
31 | getVehiculosPorTransportista: function(id) { | 31 | getVehiculosPorTransportista: function(id) { |
32 | return $http.get(API_ENDPOINT.URL + '/vehiculo/transportista/' + id); | 32 | return $http.get(API_ENDPOINT.URL + '/vehiculo/transportista/' + id); |
33 | }, | 33 | }, |
34 | getTransportistaPorId: function(id) { | 34 | getTransportistaPorId: function(id) { |
35 | return $http.get(API_ENDPOINT.URL + '/transportista/' + id); | 35 | return $http.get(API_ENDPOINT.URL + '/transportista/' + id); |
36 | } | 36 | } |
37 | }; | 37 | }; |
38 | }]); | 38 | }]); |
39 | 39 |