sending json
This commit is contained in:
parent
f1e9dc5af7
commit
ac19c13d8f
1 changed files with 1 additions and 1 deletions
2
app.rb
2
app.rb
|
@ -29,7 +29,6 @@ class LedgerRbApp < Sinatra::Base
|
|||
|
||||
get '/api/ledger/monthly/?' do
|
||||
content_type :json
|
||||
end
|
||||
param :categories, Array, default: Ledger.accounts( 1 )
|
||||
|
||||
params[ :categories ].map do
|
||||
|
@ -37,6 +36,7 @@ class LedgerRbApp < Sinatra::Base
|
|||
cat = category.first
|
||||
{ category: cat,
|
||||
data: Ledger.monthly_register( cat ) }
|
||||
end.to_json
|
||||
end
|
||||
|
||||
get '/api/ledger/version/?' do
|
||||
|
|
Loading…
Add table
Reference in a new issue