Added GroupCategories API route and controller
• Added: - GroupCategories API route and controller
This commit is contained in:
parent
7dd1e0cd0b
commit
c20f7adf6a
|
@ -0,0 +1,14 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Api::V1::GroupCategoriesController < Api::BaseController
|
||||
# respond_to :json
|
||||
|
||||
skip_before_action :set_cache_headers
|
||||
|
||||
def index
|
||||
render_cached_json('api:v1:group_categories', expires_in: 1.minute) do
|
||||
ActiveModelSerializers::SerializableResource.new(GroupCategories.all, each_serializer: REST::GroupCategoriesSerializer)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
|
@ -339,6 +339,7 @@ Rails.application.routes.draw do
|
|||
resources :scheduled_statuses, only: [:index, :show, :update, :destroy]
|
||||
resources :preferences, only: [:index]
|
||||
resources :trends, only: [:index]
|
||||
resources :group_categories, only: [:index]
|
||||
|
||||
namespace :gifs do
|
||||
get :categories
|
||||
|
|
Loading…
Reference in New Issue