ledgerrb/public/app/js/services/API.js

34 lines
811 B
JavaScript
Raw Normal View History

2014-10-12 08:23:36 +02:00
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' );
};
2014-10-20 12:52:49 +02:00
this.cleared = function( ) {
return $http.get( '/api/ledger/cleared' );
};
2014-10-12 08:23:36 +02:00
} ] );