Makes user id of authenticated user available

pull/884/head
Hagen Schink 11 years ago
parent 277f84941c
commit 61d5c6fe51
  1. 4
      app/controllers/api/v2/authentication_controller.rb
  2. 6
      app/views/api/v2/authentication/index.api.rabl

@ -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

@ -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

Loading…
Cancel
Save