add httparty option config
This commit is contained in:
@@ -30,7 +30,7 @@ class SavedSearch < ApplicationRecord
|
||||
|
||||
uri = "#{Danbooru.config.listbooru_server}/v2/search"
|
||||
|
||||
resp = HTTParty.post(uri, body: json)
|
||||
resp = HTTParty.post(uri, Danbooru.config.httparty_options.merge(body: json))
|
||||
if resp.success?
|
||||
resp.body.to_s.scan(/\d+/).map(&:to_i)
|
||||
else
|
||||
|
||||
@@ -174,7 +174,7 @@ class User < ApplicationRecord
|
||||
def update_remote_cache
|
||||
if name_changed?
|
||||
Danbooru.config.other_server_hosts.each do |server|
|
||||
HTTParty.delete("http://#{server}/users/#{id}/cache")
|
||||
HTTParty.delete("http://#{server}/users/#{id}/cache", Danbooru.config.httparty_options)
|
||||
end
|
||||
end
|
||||
rescue Exception
|
||||
|
||||
Reference in New Issue
Block a user