From f76c29beee697c8861ba2d479a6f3b2214139829 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Sun, 17 Nov 2019 23:41:28 -0600 Subject: Remove unused and incompatable filter settings. These will be re-added in time as they're rewritten to use database-level filtering. --- app/controllers/api/v1/filters_controller.rb | 4 ++-- app/controllers/api/v1/statuses_controller.rb | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'app/controllers/api/v1') diff --git a/app/controllers/api/v1/filters_controller.rb b/app/controllers/api/v1/filters_controller.rb index 8194480fa..de2c90dba 100644 --- a/app/controllers/api/v1/filters_controller.rb +++ b/app/controllers/api/v1/filters_controller.rb @@ -35,7 +35,7 @@ class Api::V1::FiltersController < Api::BaseController private def set_filters - @filters = params['all'].to_i == 1 ? current_account.custom_filters : current_account.custom_filters.where(custom_cw: nil) + @filters = params['all'].to_i == 1 ? current_account.custom_filters : [] end def set_filter @@ -43,6 +43,6 @@ class Api::V1::FiltersController < Api::BaseController end def resource_params - params.permit(:phrase, :expires_in, :whole_word, :exclude_media, :media_only, :status_text, :spoiler, :tags, :custom_cw, :override_cw, :desc, :no_desc, context: []) + params.permit(:phrase, :expires_in) end end diff --git a/app/controllers/api/v1/statuses_controller.rb b/app/controllers/api/v1/statuses_controller.rb index 601e400ca..fa3483822 100644 --- a/app/controllers/api/v1/statuses_controller.rb +++ b/app/controllers/api/v1/statuses_controller.rb @@ -2,7 +2,6 @@ class Api::V1::StatusesController < Api::BaseController include Authorization - include FilterHelper before_action -> { authorize_if_got_token! :read, :'read:statuses' }, except: [:create, :destroy] before_action -> { doorkeeper_authorize! :write, :'write:statuses' }, only: [:create, :destroy] -- cgit