mirror of
https://github.com/gwenhael-le-moine/ledgerrb.git
synced 2025-01-14 08:01:07 +01:00
52 lines
1.2 KiB
JavaScript
52 lines
1.2 KiB
JavaScript
app.service( 'API',
|
|
[ '$http',
|
|
function( $http ) {
|
|
this.balance = function( params ) {
|
|
return $http.get( '/api/ledger/balance', {
|
|
params: {
|
|
period: params.period,
|
|
categories: params.categories,
|
|
depth: params.depth
|
|
}
|
|
} );
|
|
};
|
|
|
|
this.register = function( params ) {
|
|
return $http.get( '/api/ledger/register', {
|
|
params: {
|
|
period: params.period,
|
|
categories: params.categories
|
|
}
|
|
} );
|
|
};
|
|
|
|
this.graph_values = function( params ) {
|
|
return $http.get( '/api/ledger/graph_values', {
|
|
params: {
|
|
period: params.period,
|
|
categories: params.categories
|
|
}
|
|
} );
|
|
};
|
|
|
|
this.budget = function( params ) {
|
|
return $http.get( '/api/ledger/budget', {
|
|
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' );
|
|
};
|
|
|
|
this.cleared = function( ) {
|
|
return $http.get( '/api/ledger/cleared' );
|
|
};
|
|
} ] );
|