mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 02:35:57 +02:00
Simple implementation of retained domains API endpoint
This needed a new name, there are several classes of database object to be included in that endpoint. Currently, there is one list ordered by name, with each object containing status and ascii name for convenience. Can be converted to multiple fields (reserved and blocked separately). Also contains total count. Includes CORS preflight which seems to be a known problem for Rails in the past.
This commit is contained in:
parent
a2bd9a7cc0
commit
18ce853420
4 changed files with 113 additions and 0 deletions
|
@ -39,6 +39,18 @@ Rails.application.routes.draw do
|
|||
|
||||
mount Repp::API => '/'
|
||||
|
||||
namespace :repp do
|
||||
namespace :v1 do
|
||||
resources :retained_domains, only: %i[index]
|
||||
end
|
||||
end
|
||||
|
||||
match 'repp/v1/retained_domains',
|
||||
controller: 'api/cors',
|
||||
action: 'cors_preflight_check',
|
||||
via: [:options],
|
||||
as: 'repp_cors_preflight_check'
|
||||
|
||||
namespace :api do
|
||||
namespace :v1 do
|
||||
namespace :registrant do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue