plugged cleared into API

This commit is contained in:
Gwenhael Le Moine 2014-10-20 12:52:49 +02:00
parent 896da4c328
commit 0c25ceec42
2 changed files with 7 additions and 9 deletions

12
app.rb
View file

@ -55,15 +55,9 @@ class LedgerRbApp < Sinatra::Base
.to_json
end
# get '/api/ledger/cleared/?' do
# Ledger.balance( true ).to_json
# end
# get '/api/ledger/cleared/depth/:depth/?' do
# param :depth, Integer, required: true
# Ledger.balance( true, params[ :depth ] ).to_json
# end
get '/api/ledger/cleared/?' do
Ledger.cleared.to_json
end
get '/api/ledger/version/?' do
Ledger.version

View file

@ -26,4 +26,8 @@ app.service( 'API',
this.accounts = function( ) {
return $http.get( '/api/ledger/accounts' );
};
this.cleared = function( ) {
return $http.get( '/api/ledger/cleared' );
};
} ] );