module Api module V1 # @note This controller partially authorizes with the ArticlePolicy, in an ideal world, it would # fully authorize. However, that refactor would require significantly more work. class ArticlesController < ApiController include Api::ArticlesController before_action :authenticate_with_api_key!, only: %i[create update me unpublish] before_action :validate_article_param_is_hash, only: %i[create update] before_action :set_cache_control_headers, only: %i[index show show_by_slug] after_action :verify_authorized, only: %i[create] end end end