Add handling of type filters and handling of ETags

Add API documentation and test cases around ETags for the API.
This commit is contained in:
Maciej Szlosarczyk 2020-05-15 14:43:18 +03:00
parent 960e4084e3
commit 6e5a97ad4d
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765
5 changed files with 182 additions and 19 deletions

View file

@ -2,10 +2,14 @@ module Repp
module V1
class RetainedDomainsController < ActionController::API
def index
domains = RetainedDomains.new
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