From d9e6204cd6293d747f6051166aff52f3f2b1b410 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Sun, 17 Nov 2019 19:11:45 -0600 Subject: Do away with the kludgy solution of applying users' filters from API controllers; we will do this in the `Status` model instead, and at the database level. --- app/controllers/api/v1/timelines/public_controller.rb | 2 +- app/controllers/api/v1/timelines/tag_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/controllers/api/v1/timelines') diff --git a/app/controllers/api/v1/timelines/public_controller.rb b/app/controllers/api/v1/timelines/public_controller.rb index 66079140b..86307271a 100644 --- a/app/controllers/api/v1/timelines/public_controller.rb +++ b/app/controllers/api/v1/timelines/public_controller.rb @@ -8,7 +8,7 @@ class Api::V1::Timelines::PublicController < Api::BaseController respond_to :json def show - @statuses = current_account ? load_statuses.reject { |status| phrase_filtered?(status, current_account.id, 'public') } : load_statuses + @statuses = load_statuses render json: @statuses, each_serializer: REST::StatusSerializer, relationships: StatusRelationshipsPresenter.new(@statuses, current_user&.account_id) end diff --git a/app/controllers/api/v1/timelines/tag_controller.rb b/app/controllers/api/v1/timelines/tag_controller.rb index f6ca033c7..35202b1fa 100644 --- a/app/controllers/api/v1/timelines/tag_controller.rb +++ b/app/controllers/api/v1/timelines/tag_controller.rb @@ -9,7 +9,7 @@ class Api::V1::Timelines::TagController < Api::BaseController respond_to :json def show - @statuses = current_account ? load_statuses.reject { |status| phrase_filtered?(status, current_account.id, 'public') } : load_statuses + @statuses = load_statuses render json: @statuses, each_serializer: REST::StatusSerializer, relationships: StatusRelationshipsPresenter.new(@statuses, current_user&.account_id) end -- cgit