Class: Api::V5::CountriesController
- Inherits:
-
BaseController
- Object
- ActionController::API
- BaseController
- Api::V5::CountriesController
- Defined in:
- app/controllers/api/v5/countries_controller.rb
Constant Summary
Constants inherited from BaseController
BaseController::CACHE_NAMESPACE, BaseController::INTERNAL_SERVER_ERROR_MESSAGE, BaseController::ResponseSchema
Instance Method Summary collapse
Methods inherited from BaseController
Methods included from LogrageCustomLogger
Methods included from ResponseCacheConcern
Instance Method Details
#index ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'app/controllers/api/v5/countries_controller.rb', line 7 def index expires_in DEFAULT_HTTP_PUBLIC_CACHE_EXPIRATION, public: true if params[:country_id].present? render json: { data: fetch_country, success: true, message: '' } else render json: { data: fetch_countries, success: true, message: '' } end end |