openstreetmap-website/app/controllers/api/versions_controller.rb
Andy Allan c1cccd40fc Move check_api_readable to api_controller
It's easier to skip the check in the two places that we need to, and
include it by default everywhere else.
2024-05-29 14:54:16 +01:00

17 lines
544 B
Ruby

module Api
class VersionsController < ApiController
skip_before_action :check_api_readable
authorize_resource :class => false
before_action :set_request_formats
around_action :api_call_handle_error, :api_call_timeout
# Show the list of available API versions. This will replace the global
# unversioned capabilities call in due course.
# Currently we only support deploying one version at a time, but this will
# hopefully change soon.
def show
@versions = [Settings.api_version]
end
end
end