mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 18:56:05 +02:00
Merge branch '1832-registrar-prefix-on-contact-info-and-check-requests' of https://github.com/internetee/registry into 1832-registrar-prefix-on-contact-info-and-check-requests
This commit is contained in:
commit
1960164223
2 changed files with 6 additions and 5 deletions
|
@ -45,9 +45,9 @@ class Epp::Contact < Contact
|
|||
def check_availability(codes, reg:)
|
||||
codes = [codes] if codes.is_a?(String)
|
||||
res = []
|
||||
codes.map { |c| c.strip.upcase }.map { |c| c.include?(':') ? c : "#{reg}:#{c}" }.each do |x|
|
||||
codes.map { |c| c.include?(':') ? c : "#{reg}:#{c}" }.map { |c| c.strip.upcase }.each do |x|
|
||||
c = find_by_epp_code(x)
|
||||
res << c ? { code: c.code, avail: 0, reason: 'in use' } : { code: x, avail: 1 }
|
||||
res << (c ? { code: c.code, avail: 0, reason: 'in use' } : { code: x, avail: 1 })
|
||||
end
|
||||
|
||||
res
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue