Added client version adn fixed bug

This commit is contained in:
Mike Slemmer 2013-08-06 08:25:49 -07:00
parent 432139aebc
commit 13d823e728
1 changed files with 3 additions and 1 deletions

View File

@ -493,10 +493,12 @@ class ApiUsersController < ApiController
# This should largely be moved into a library somewhere in jam-ruby.
def crash_dump
# example of using curl to access this API:
# curl -L -T some_file -X PUT http://localhost:3000/api/users/dump.json?client_type=[MACOSX/Win32/JamBox]&client_id=[CLIENT_ID]&session_id=[SESSION_ID]&timestamp=[TIMESTAMP]
# curl -L -T some_file -X PUT http://localhost:3000/api/users/dump.json?client_type=[MACOSX/Win32/JamBox]&client_version=[VERSION]&client_id=[CLIENT_ID]&session_id=[SESSION_ID]&timestamp=[TIMESTAMP]
# user_id is deduced if possible from the user's cookie.
@dump = CrashDump.new
@dump.client_type = params[:client_type]
@dump.client_version = params[:client_version]
@dump.client_id = params[:client_id]
@dump.user_id = current_user
@dump.session_id = params[:session_id]