diff --git a/app/controllers/api/v2/authentication_controller.rb b/app/controllers/api/v2/authentication_controller.rb index e86c3f4ffe..66f03fafdc 100644 --- a/app/controllers/api/v2/authentication_controller.rb +++ b/app/controllers/api/v2/authentication_controller.rb @@ -35,7 +35,11 @@ module Api unloadable + AuthorizationData = Struct.new(:authorized, :authorized_user_id) + def index + @authorization = AuthorizationData.new(true, User.current.id) + respond_to do |format| format.api end diff --git a/app/views/api/v2/authentication/index.api.rabl b/app/views/api/v2/authentication/index.api.rabl index dd4ecd7e09..633f44f453 100644 --- a/app/views/api/v2/authentication/index.api.rabl +++ b/app/views/api/v2/authentication/index.api.rabl @@ -25,7 +25,5 @@ # # See doc/COPYRIGHT.rdoc for more details. #++ -object :none -node :authorization do - {authorized: true} -end +object @authorization => :authorization +attributes :authorized, :authorized_user_id