mirror of
https://github.com/internetee/registry.git
synced 2025-07-31 23:16:23 +02:00
Covered with tests api users and white ips
This commit is contained in:
parent
9cbf9f88bf
commit
a4d28a0ee2
14 changed files with 618 additions and 4 deletions
|
@ -61,7 +61,7 @@ module Repp
|
|||
private
|
||||
|
||||
def api_user_params
|
||||
params.require(:api_user).permit(:id, :username, :plain_text_password, :active,
|
||||
params.require(:api_user).permit(:username, :plain_text_password, :active,
|
||||
:identity_code, { roles: [] })
|
||||
end
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ module Repp
|
|||
class WhiteIpsController < BaseController
|
||||
load_and_authorize_resource
|
||||
|
||||
THROTTLED_ACTIONS = %i[index create update destroy].freeze
|
||||
THROTTLED_ACTIONS = %i[index show create update destroy].freeze
|
||||
include Shunter::Integration::Throttle
|
||||
|
||||
api :GET, '/repp/v1/white_ips'
|
||||
|
@ -58,7 +58,7 @@ module Repp
|
|||
private
|
||||
|
||||
def white_ip_params
|
||||
params.require(:white_ip).permit(:id, :ipv4, :ipv6, interfaces: [])
|
||||
params.require(:white_ip).permit(:ipv4, :ipv6, interfaces: [])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue