ledgerrb/public/app/js/services/API.js
Gwenhael Le Moine e635701813 API service
2014-10-12 08:23:36 +02:00

29 lines
715 B
JavaScript

app.service( 'API',
[ '$http',
function( $http ) {
this.balance = function( params ) {
return $http.get( '/api/ledger/balance', {
params: {
period: params.period,
categories: params.categories
}
} );
};
this.register = function( params ) {
return $http.get( '/api/ledger/register', {
params: {
period: params.period,
categories: params.categories
}
} );
};
this.dates_salaries = function( ) {
return $http.get( '/api/ledger/dates_salaries' );
};
this.accounts = function( ) {
return $http.get( '/api/ledger/accounts' );
};
} ] );