* API Articles v0-v1 restructure * Remove unused helper * Bulk move API controllers into concerns + add V1 controllers * Extract API routes + some fixes * Fix v1 api_controller authenticate! + add more article_controller specs * Completed spec/requests/api/v1/articles_spec.rb * specs up to listings * All v1 specs except for 9 skips * mime_types cleanup + authenticate! relocation Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
17 lines
510 B
Ruby
17 lines
510 B
Ruby
module Api
|
|
module V0
|
|
class AnalyticsController < ApiController
|
|
respond_to :json
|
|
|
|
rescue_from ArgumentError, with: :error_unprocessable_entity
|
|
rescue_from ApplicationPolicy::NotAuthorizedError, with: :error_unauthorized
|
|
|
|
include Api::AnalyticsController
|
|
|
|
before_action :authenticate_with_api_key_or_current_user!
|
|
before_action :authorize_user_organization
|
|
before_action :load_owner
|
|
before_action :validate_date_params, only: [:historical]
|
|
end
|
|
end
|
|
end
|