mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 18:26:06 +02:00
resolve structure conflict
This commit is contained in:
parent
f6e46b8fe6
commit
d56c61bf84
7 changed files with 106 additions and 10 deletions
|
@ -2,17 +2,23 @@ module Repp
|
|||
module V1
|
||||
module Registrar
|
||||
class AccreditationInfoController < BaseController
|
||||
api :GET, 'repp/v1/registrar/accreditation_info'
|
||||
api :GET, 'repp/v1/registrar/accreditation/get_info'
|
||||
desc 'check login user and return data'
|
||||
|
||||
def index
|
||||
@login = current_user
|
||||
registrar = current_user.registrar
|
||||
|
||||
# name = registrar.name
|
||||
# reg_no = registrar.reg_no
|
||||
|
||||
# rubocop:disable Style/AndOr
|
||||
render_success(data: nil) and return unless @login
|
||||
# rubocop:enable Style/AndOr
|
||||
|
||||
data = @login.as_json
|
||||
data = @login.as_json(only: %i[id username name reg_no uuid roles accreditation_date accreditation_expire_date])
|
||||
data[:registrar_name] = registrar.name
|
||||
data[:registrar_reg_no] = registrar.reg_no
|
||||
|
||||
render_success(data: data)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue