FEATURE: API Scope for latest.rss feed (#21906)
Adds an API scope for the `/latest.rss` route. https://meta.discourse.org/t/188480
This commit is contained in:
parent
6409794e0f
commit
56ee46bf63
|
@ -6,7 +6,7 @@ class ApiKeyScope < ActiveRecord::Base
|
|||
|
||||
class << self
|
||||
def list_actions
|
||||
actions = %w[list#category_feed list#category_default]
|
||||
actions = %w[list#category_feed list#category_default list#latest_feed]
|
||||
|
||||
%i[latest unread new top].each { |f| actions.concat(["list#category_#{f}", "list##{f}"]) }
|
||||
|
||||
|
|
|
@ -434,6 +434,8 @@ RSpec.describe Admin::ApiController do
|
|||
"invites",
|
||||
"wordpress",
|
||||
)
|
||||
|
||||
expect(scopes["topics"].any? { |h| h["urls"].include?("/latest.rss (GET)") }).to be_truthy
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue