internetee-registry/app/controllers/repp/v1/retained_domains_controller.rb
Maciej Szlosarczyk 6e5a97ad4d
Add handling of type filters and handling of ETags
Add API documentation and test cases around ETags for the API.
2020-05-15 14:43:18 +03:00

15 lines
320 B
Ruby

module Repp
module V1
class RetainedDomainsController < ActionController::API
def index
domains = RetainedDomains.new(query_params)
render json: { count: domains.count, domains: domains.to_jsonable }
end
def query_params
params.permit(:type)
end
end
end
end