mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 10:45:58 +02:00
Fix tests
This commit is contained in:
parent
27774cc275
commit
a6f7af0f03
8 changed files with 35 additions and 26 deletions
|
@ -82,6 +82,8 @@ module Repp
|
|||
|
||||
return if @current_user
|
||||
|
||||
render(json: { errors: [{ base: ['Not authorized'] }] }, status: :unauthorized)
|
||||
rescue NoMethodError
|
||||
render(json: { errors: [{ base: ['Not authorized'] }] }, status: :unauthorized)
|
||||
end
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ module Repp
|
|||
if @errors.any?
|
||||
render_success(data: { errors: @errors })
|
||||
else
|
||||
render_success(data: successful)
|
||||
render_success(data: @successful)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ module Repp
|
|||
|
||||
def hostname_params
|
||||
params.require(:data).require(%i[type id])
|
||||
params.require(:data).require(:attributes).require(%i[hostname ipv4 ipv6])
|
||||
params.require(:data).require(:attributes)
|
||||
|
||||
params.permit(data: [:type, :id, attributes: [:hostname, ipv4: [], ipv6: []]])
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue