mirror of
https://github.com/internetee/registry.git
synced 2025-07-27 13:06:18 +02:00
Added white ip show page
This commit is contained in:
parent
18cd6f5046
commit
b44c757602
2 changed files with 8 additions and 2 deletions
|
@ -11,10 +11,16 @@ module Repp
|
||||||
def index
|
def index
|
||||||
ips = current_user.registrar.white_ips
|
ips = current_user.registrar.white_ips
|
||||||
|
|
||||||
render_success(data: { ips: ips.as_json(except: %i[creator_str updator_str]),
|
render_success(data: { ips: ips.as_json,
|
||||||
count: ips.count })
|
count: ips.count })
|
||||||
end
|
end
|
||||||
|
|
||||||
|
api :GET, '/repp/v1/white_ips/:id'
|
||||||
|
desc 'Get a specific whitelisted IP address'
|
||||||
|
def show
|
||||||
|
render_success(data: { ip: @white_ip.as_json, interfaces: WhiteIp::INTERFACES })
|
||||||
|
end
|
||||||
|
|
||||||
api :POST, '/repp/v1/white_ips'
|
api :POST, '/repp/v1/white_ips'
|
||||||
desc 'Add new whitelisted IP'
|
desc 'Add new whitelisted IP'
|
||||||
def create
|
def create
|
||||||
|
|
|
@ -109,7 +109,7 @@ Rails.application.routes.draw do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
resources :api_users, only: %i[index show update create destroy]
|
resources :api_users, only: %i[index show update create destroy]
|
||||||
resources :white_ips, only: %i[index update create destroy]
|
resources :white_ips, only: %i[index show update create destroy]
|
||||||
namespace :registrar do
|
namespace :registrar do
|
||||||
resources :notifications, only: %i[index show update] do
|
resources :notifications, only: %i[index show update] do
|
||||||
collection do
|
collection do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue