From 2346ef25ce6de95638b3b30e56127270281077fe Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Mon, 25 May 2020 21:06:04 -0400 Subject: [PATCH] Updated public and tag timline controllers to require user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Updated: - public and tag timline controllers to require user --- app/controllers/api/v1/timelines/public_controller.rb | 1 + app/controllers/api/v1/timelines/tag_controller.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/controllers/api/v1/timelines/public_controller.rb b/app/controllers/api/v1/timelines/public_controller.rb index aabe2432..46f78f53 100644 --- a/app/controllers/api/v1/timelines/public_controller.rb +++ b/app/controllers/api/v1/timelines/public_controller.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true class Api::V1::Timelines::PublicController < Api::BaseController + before_action :require_user!, only: [:show] after_action :insert_pagination_headers, unless: -> { @statuses.empty? } respond_to :json diff --git a/app/controllers/api/v1/timelines/tag_controller.rb b/app/controllers/api/v1/timelines/tag_controller.rb index 9adc4ad2..b10b3de5 100644 --- a/app/controllers/api/v1/timelines/tag_controller.rb +++ b/app/controllers/api/v1/timelines/tag_controller.rb @@ -2,6 +2,7 @@ class Api::V1::Timelines::TagController < Api::BaseController before_action :load_tag + before_action :require_user!, only: [:show] after_action :insert_pagination_headers, unless: -> { @statuses.empty? } respond_to :json