mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +02:00
Add affected domain parameter to REST API response
This commit is contained in:
parent
b5f07682f4
commit
3e81366cfc
6 changed files with 12 additions and 7 deletions
|
@ -29,7 +29,7 @@ module Repp
|
|||
}
|
||||
|
||||
begin
|
||||
current_user.registrar.replace_nameservers(hostname, new_attributes)
|
||||
affected_domains = current_user.registrar.replace_nameservers(hostname, new_attributes)
|
||||
rescue ActiveRecord::RecordInvalid => e
|
||||
error!({ errors: e.record.errors.full_messages.map { |error| { title: error } } }, 400)
|
||||
end
|
||||
|
@ -37,7 +37,8 @@ module Repp
|
|||
status 200
|
||||
@response = { data: { type: 'nameserver',
|
||||
id: params[:data][:attributes][:hostname],
|
||||
attributes: params[:data][:attributes] } }
|
||||
attributes: params[:data][:attributes],
|
||||
affected_domains: affected_domains } }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue