Updated some controllers to inherit from EmptyController
• Updated: - some controllers to inherit from EmptyController
This commit is contained in:
@@ -1,13 +1,8 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Api::V1::CustomEmojisController < Api::BaseController
|
||||
respond_to :json
|
||||
|
||||
skip_before_action :set_cache_headers
|
||||
|
||||
class Api::V1::CustomEmojisController < EmptyController
|
||||
def index
|
||||
render_cached_json('api:v1:custom_emojis', expires_in: 1.minute) do
|
||||
ActiveModelSerializers::SerializableResource.new(CustomEmoji.local.where(disabled: false), each_serializer: REST::CustomEmojiSerializer)
|
||||
end
|
||||
data = ActiveModelSerializers::SerializableResource.new(CustomEmoji.local.where(disabled: false), each_serializer: REST::CustomEmojiSerializer)
|
||||
render json: data.to_json, content_type: 'application/json'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user