mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 08:22:05 +02:00
Updated REPP API for new registrar portal
This commit is contained in:
parent
e17b21436d
commit
a5ffce290d
61 changed files with 1269 additions and 408 deletions
|
@ -28,14 +28,20 @@ class Action < ApplicationRecord
|
|||
end
|
||||
|
||||
def to_non_available_contact_codes
|
||||
return [] unless bulk_action?
|
||||
return [serialized_contact(contact)] unless bulk_action?
|
||||
|
||||
subactions.map do |a|
|
||||
{
|
||||
code: a.contact.code,
|
||||
avail: 0,
|
||||
reason: 'in use',
|
||||
}
|
||||
serialized_contact(a.contact)
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def serialized_contact(contact)
|
||||
{
|
||||
code: contact.code,
|
||||
avail: 0,
|
||||
reason: 'in use',
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue