This commit is contained in:
bohung committed 2022-05-09 23:11:07 +08:00
1 parent 850956c09d
commit fd23167f98
1 file changed
+6 -2
+6 -2
View File
@@ -99,7 +99,9 @@ class SiteFeed
request = Net::HTTP::Post.new("/xhr/#{self.channel_key.pluralize}/feed_add_remote/#{self.feed_uid}", 'Content-Type' => 'application/json')
request.body = {"url"=>root_url}.to_json
response = http_req.request(request)
self.update(:enable_notify=>true)
if response.code.to_i == 200
self.update(:enable_notify=>true)
end
end
end
end
@@ -116,7 +118,9 @@ class SiteFeed
request = Net::HTTP::Post.new("/xhr/#{self.channel_key.pluralize}/feed_remove_remote/#{self.feed_uid}", 'Content-Type' => 'application/json')
request.body = {"url"=>root_url}.to_json
response = http_req.request(request)
self.update(:enable_notify=>false)
if response.code.to_i == 200
self.update(:enable_notify=>false)
end
end
end
end