service.js 691 Bytes
angular.module('focaModalCotizacion')
    .service('focaModalCotizacionService', [
        '$http',
        'API_ENDPOINT',
        function($http, API_ENDPOINT) {
            return {
                getCotizaciones: function(idMoneda) {
                    return $http.get(API_ENDPOINT.URL + '/moneda/' + idMoneda);
                },
                getCotizacionesActuales: function() {
                    return $http.get(API_ENDPOINT.URL + '/cotizacion');
                },
                guardarCotizacion: function(cotizacion) {
                    return $http.post(API_ENDPOINT.URL + '/cotizacion', {cotizacion: cotizacion});
                }
            };
        }
    ]);