Skip to content

Commit

Permalink
Update apis.rb
Browse files Browse the repository at this point in the history
when send message, get a error in console: NoMethodError - undefined method `string' for #<Rack::Lint::InputWrapper...
and page show "Response for undefined"
  • Loading branch information
wwfifi committed Jan 25, 2015
1 parent a528715 commit bb04eb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/apis.rb
Expand Up @@ -6,7 +6,7 @@ class WecheatApp
end

post '/api/message/custom/send' do
Wecheat::Utils.log_received_message({app: @app.label, response: request.body.string}.to_json)
Wecheat::Utils.log_received_message({app: @app.label, response: request.body.read}.to_json)
json errcode: 0
end

Expand All @@ -20,4 +20,4 @@ class WecheatApp

end

Dir[File.expand_path('../apis/*.rb',__FILE__)].each{|f| require f }
Dir[File.expand_path('../apis/*.rb',__FILE__)].each{|f| require f }

0 comments on commit bb04eb9

Please sign in to comment.