Skip to content
This repository was archived by the owner on Feb 27, 2023. It is now read-only.

Commit 096806b

Browse files
authored
Use Sinatra::IndifferentHash instead of indifferent_hash due to Sinatra update (#31)
Bug introduced by #24, when we updated Sinatra from 1.4.7 -> 2.0.1, but missed updating the json content-type branch. Fixes #29, alternative to #30 (don't need to maintain `indifferent_hash` backwards compatibility because we specify the Sinatra version in the Gemfile)
1 parent 0f43fcb commit 096806b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def log_info(message)
4242
# Get the credit card details submitted
4343
payload = params
4444
if request.content_type.include? 'application/json' and params.empty?
45-
payload = indifferent_params(JSON.parse(request.body.read))
45+
payload = Sinatra::IndifferentHash[JSON.parse(request.body.read)]
4646
end
4747

4848
source = payload[:source]

0 commit comments

Comments
 (0)