mirror of
https://github.com/discourse/discourse.git
synced 2025-04-26 18:34:33 +08:00
FIX: discourse hub calls
This commit is contained in:
parent
492eed70ab
commit
1b3501b39b
@ -51,8 +51,8 @@ module DiscourseHub
|
|||||||
def self.collection_action(action, rel_url, params={})
|
def self.collection_action(action, rel_url, params={})
|
||||||
JSON.parse(Excon.send(action,
|
JSON.parse(Excon.send(action,
|
||||||
"#{hub_base_url}#{rel_url}",
|
"#{hub_base_url}#{rel_url}",
|
||||||
body: URI.encode_www_form(params),
|
body: JSON[params],
|
||||||
headers: { 'Referer' => referer, 'Accept' => accepts.join(', '), "Content-Type" => "application/x-www-form-urlencoded" },
|
headers: { 'Referer' => referer, 'Accept' => accepts.join(', '), "Content-Type" => "application/json" },
|
||||||
omit_default_port: true
|
omit_default_port: true
|
||||||
).body)
|
).body)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user