mirror of
https://github.com/internetee/registry.git
synced 2025-07-28 13:36:15 +02:00
Updaded api user return data
This commit is contained in:
parent
363a9a7357
commit
7939c5065d
3 changed files with 3 additions and 2 deletions
|
@ -143,7 +143,7 @@ module Repp
|
|||
arr = []
|
||||
users.each do |u|
|
||||
arr << { id: u.id, username: u.username,
|
||||
role: u.roles.first }
|
||||
role: u.roles.first, registrar_name: u.registrar.name }
|
||||
end
|
||||
|
||||
arr
|
||||
|
|
|
@ -7,7 +7,7 @@ module Repp
|
|||
|
||||
unless @new_contact.identical_to?(@current_contact)
|
||||
@epp_errors.add(:epp_errors,
|
||||
msg: 'Admin contacts must be identical',
|
||||
msg: 'New and current admin contacts ident data must be identical',
|
||||
code: '2304')
|
||||
end
|
||||
|
||||
|
|
|
@ -74,6 +74,7 @@ class ApiUser < User
|
|||
self.class.where(identity_code: identity_code)
|
||||
.where("identity_code IS NOT NULL AND identity_code != ''")
|
||||
.where.not(id: id)
|
||||
.includes(:registrar)
|
||||
end
|
||||
|
||||
def linked_with?(another_api_user)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue