plugged cleared into API
This commit is contained in:
parent
896da4c328
commit
0c25ceec42
2 changed files with 7 additions and 9 deletions
12
app.rb
12
app.rb
|
@ -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
|
||||
|
|
|
@ -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' );
|
||||
};
|
||||
} ] );
|
||||
|
|
Loading…
Add table
Reference in a new issue