Sha256: 0a7c2f5c05476cf8af62c69394ea0b17f8443f24bab2b7695410649641540eca
Contents?: true
Size: 464 Bytes
Versions: 22
Compression:
Stored size: 464 Bytes
Contents
Server.api :get_api_token, :admin do |params,user| warning_message = "API method 'get_api_token' is deprecated. Use 'login' method only, it returns api token in response's body" params[:warning] = warning_message unless params.nil? do_get_api_token(params, user) end def do_get_api_token(params, user) if user and user.admin == 1 and user.token user.token.value else raise ApiException.new(422, "Invalid/missing API user") end end
Version data entries
22 entries across 22 versions & 1 rubygems