added api endpoint for registrar login

This commit is contained in:
Oleg Hasjanov 2021-07-28 12:11:38 +03:00 committed by olegphenomenon
parent 39b9c94251
commit 6e82d8be9e
2 changed files with 27 additions and 0 deletions

View file

@ -0,0 +1,22 @@
module Repp
module V1
module Registrar
class LoginController < BaseController
api :GET, 'repp/v1/registrar/login'
desc 'check login user and return data'
def index
@login = current_user
# rubocop:disable Style/AndOr
render_success(data: nil) and return unless @login
# rubocop:enable Style/AndOr
data = @login.as_json()
render_success(data: data)
end
end
end
end
end