Skip to content

Commit

Permalink
[webui] Consume RSS feeds using a token
Browse files Browse the repository at this point in the history
  • Loading branch information
Moises Deniz Aleman authored and hennevogel committed Jun 29, 2017
1 parent 300ff93 commit 3d50a84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/api/app/views/layouts/webui/webui.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
<% end %>
<% end %>
<%= csrf_meta_tag %>
<%= auto_discovery_link_tag(:rss, user_rss_notifications_url(format: :rss), { title: 'Notifications' }) %>
<% if User.current.try(:rss_token) %>
<%= auto_discovery_link_tag(:rss, user_rss_notifications_url(token: User.current.rss_token.string, format: :rss), { title: 'Notifications' }) %>
<% end %>
</head>
<body>
<div class="overlay"></div>
Expand Down
2 changes: 1 addition & 1 deletion src/api/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def self.public_or_about_path?(request)
get 'main/news' => :news, as: :news_feed
get 'main/latest_updates' => :latest_updates, as: :latest_updates_feed
get 'project/latest_commits/:project' => :commits, defaults: { format: 'atom' }, constraints: cons, as: 'commits_feed'
get 'user/feed' => :notifications, defaults: { format: 'rss' }, as: :user_rss_notifications
get 'user/feed/:token' => :notifications, defaults: { format: 'rss' }, as: :user_rss_notifications
end

resources :attribs, constraints: cons, only: [:create, :update, :destroy], controller: 'webui/attribute' do
Expand Down

0 comments on commit 3d50a84

Please sign in to comment.