This commit is contained in:
BoHung Chiu 2022-05-10 18:25:28 +08:00
parent e0e388faa6
commit 3bed92d2a9
1 changed files with 2 additions and 2 deletions

View File

@ -452,7 +452,7 @@ class Admin::AnnouncementsController < OrbitAdminController
http_req = Net::HTTP.new(uri.host, uri.port)
if remote_url.include?('https')
http_req.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
http_req.verify_mode = OpenSSL::SSL::VERIFY_NONE
end
response = http_request( http_req , request )
end
@ -467,9 +467,9 @@ class Admin::AnnouncementsController < OrbitAdminController
end
def destroy
related_feeds = @bulletin.get_related_feeds.select{|feed| feed.remote_urls.count != 0}
@bulletin.destroy
Thread.new do
related_feeds = @bulletin.get_related_feeds.select{|feed| feed.remote_urls.count != 0}
if related_feeds.count != 0
tmp_data = {'type'=>'destroy', 'data'=>[@bulletin.uid]}
request = Net::HTTP::Post.new('/xhr/feeds/notify_change', 'Content-Type' => 'application/json')