mirror of
https://github.com/internetee/registry.git
synced 2025-06-05 12:17:30 +02:00
added api endpoint for registrar login
This commit is contained in:
parent
39b9c94251
commit
6e82d8be9e
2 changed files with 27 additions and 0 deletions
22
app/controllers/repp/v1/registrar/login_controller.rb
Normal file
22
app/controllers/repp/v1/registrar/login_controller.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue