mirror of
https://github.com/nov/fb_graph2
synced 2023-03-27 23:22:15 -04:00
parent
32039cc401
commit
71dde01f86
1 changed files with 6 additions and 7 deletions
|
@ -54,13 +54,12 @@ module MockGraph
|
|||
authorization: "Bearer #{options[:access_token]}"
|
||||
}
|
||||
end
|
||||
if options[:params]
|
||||
params = options.try(:[], :params) || {}
|
||||
case method
|
||||
when :post, :put, :delete
|
||||
request[:body] = options[:params]
|
||||
request[:body] = params
|
||||
else
|
||||
request[:query] = options[:params]
|
||||
end
|
||||
request[:query] = params
|
||||
end
|
||||
request
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue