optional trailing /

This commit is contained in:
Gwenhael Le Moine 2014-07-27 22:02:59 +02:00
parent ac19c13d8f
commit 90d343636e

2
app.rb
View file

@ -20,7 +20,7 @@ class LedgerRbApp < Sinatra::Base
Ledger.accounts.to_json
end
get '/api/ledger/accounts/depth/:depth' do
get '/api/ledger/accounts/depth/:depth/?' do
content_type :json
param :depth, Integer, required: true