mirror of
https://github.com/gwenhael-le-moine/ledgerrb.git
synced 2025-02-05 20:46:02 +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
|
Ledger.cleared.to_json
|
||||||
end
|
end
|
||||||
|
|
||||||
|
get '/api/ledger/budget/?' do
|
||||||
|
param :period, String, default: 'this month'
|
||||||
|
|
||||||
|
Ledger.budget( params[ :period ] ).to_json
|
||||||
|
end
|
||||||
|
|
||||||
get '/api/ledger/version/?' do
|
get '/api/ledger/version/?' do
|
||||||
Ledger.version
|
Ledger.version
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue