Skip to content

Commit

Permalink
update for the review
Browse files Browse the repository at this point in the history
  • Loading branch information
rbi-aap committed Jul 15, 2024
1 parent 6a36641 commit 87c3098
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions newsroom/news_api/news/syndicate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,12 @@ def __init__(self, map, regex='[^/]+'):
self.regex = regex


def get_feed(syndicate_formatter, token=None):

def generate_feed(syndicate_formatter):
response = get_internal('news/search')
return FORMAT_HANDLERS_INIT[syndicate_formatter.lower()](response[0])

return generate_feed(syndicate_formatter)


@blueprint.route('/<regex("atom|rss"):syndicate_type>', methods=['GET'])
@blueprint.route('/<regex("atom|rss"):syndicate_type>/<path:token>', methods=['GET'])
@authenticate
def get_syndicate_feed(syndicate_type, token=None):
return get_feed(syndicate_type, token)
response = get_internal('news/search')
return FORMAT_HANDLERS_INIT[syndicate_type.lower()](response[0])


def init_app(app):
Expand Down

0 comments on commit 87c3098

Please sign in to comment.