* Remove :api_v1 feature flag * Reworking the auth configs throughout V1 + specs * Fix remaining v1 specs * Enhanced inline docs * deprecation warning update * Use headers variable for most v1 specs * Cherry pick spec changes * Fix specs * group let! statements - rubocop * Bring back ||= on api v1 authentication methods * Bump swagger/v1/api_v1.json
14 lines
619 B
Ruby
14 lines
619 B
Ruby
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
|