This repository has been archived on 2024-07-31. You can view files and clone it, but cannot push or open issues or pull requests.
2020-09-01 20:13:10 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Api::V1::Accounts::FeaturedTagsController < Api::BaseController
|
|
|
|
before_action :set_account
|
|
|
|
before_action :set_featured_tags
|
|
|
|
|
|
|
|
respond_to :json
|
|
|
|
|
|
|
|
def index
|
2020-12-23 10:43:38 -05:00
|
|
|
render json: @featured_tags, each_serializer: REST::FeaturedTagSerializer
|
2020-09-01 20:13:10 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def set_account
|
|
|
|
@account = Account.find(params[:account_id])
|
|
|
|
end
|
|
|
|
|
|
|
|
def set_featured_tags
|
2020-12-03 22:22:35 -05:00
|
|
|
@featured_tags = @account.suspended? ? [] : @account.featured_tags
|
2020-09-01 20:13:10 -04:00
|
|
|
end
|
|
|
|
end
|