From a62de51b78ba7b485860aaeef4d81a883232577a Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Mon, 9 Nov 2020 12:33:28 -0600 Subject: [PATCH] Removed unused api TrendsController from ruby MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Removed: - unused api TrendsController from ruby --- app/controllers/api/v1/trends_controller.rb | 21 --------------------- config/routes.rb | 1 - 2 files changed, 22 deletions(-) delete mode 100644 app/controllers/api/v1/trends_controller.rb diff --git a/app/controllers/api/v1/trends_controller.rb b/app/controllers/api/v1/trends_controller.rb deleted file mode 100644 index 002eae34..00000000 --- a/app/controllers/api/v1/trends_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class Api::V1::TrendsController < Api::BaseController - include Authorization - - before_action -> { doorkeeper_authorize! :read } - before_action :require_user! - before_action :set_tags - - respond_to :json - - def index - render json: @tags, each_serializer: REST::TagSerializer - end - - private - - def set_tags - @tags = TrendingTags.get(7) - end -end diff --git a/config/routes.rb b/config/routes.rb index a76dc658..147915ce 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -336,7 +336,6 @@ Rails.application.routes.draw do resources :suggestions, only: [:index, :destroy] resources :scheduled_statuses, only: [:index, :show, :update, :destroy] resources :preferences, only: [:index] - resources :trends, only: [:index] resources :group_categories, only: [:index] resources :conversations, only: [:index, :destroy] do