   if data?.get? then data.get() else data
 
 
-getConstructorName = (name, Models) ->
-
-  for own model, konstructor of Models
+getConstructorName = (name, api) ->
+
+  for own model, konstructor of api
     return model  if model.toLowerCase() is name.toLowerCase()
 
 


      return

    Models.JApiToken.createSessionByToken token, (err, session) ->

      if err or not session
        return callback apiErrors.unauthorizedRequest


    return

  api.JSession.one { clientId: token }, (err, session) ->

    if err
      return callback apiErrors.unauthorizedRequest
