mirror of
https://github.com/gwenhael-le-moine/ledgerrb.git
synced 2025-01-28 07:58:29 +01:00
api budget
This commit is contained in:
parent
65514534b7
commit
b6b1f30ccf
1 changed files with 6 additions and 0 deletions
6
app.rb
6
app.rb
|
@ -59,6 +59,12 @@ class LedgerRbApp < Sinatra::Base
|
|||
Ledger.cleared.to_json
|
||||
end
|
||||
|
||||
get '/api/ledger/budget/?' do
|
||||
param :period, String, default: 'this month'
|
||||
|
||||
Ledger.budget( params[ :period ] ).to_json
|
||||
end
|
||||
|
||||
get '/api/ledger/version/?' do
|
||||
Ledger.version
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue