Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/glacials/splits-io. a speedrunning data store and analysis engine splits.io
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738class GoogleController < ApplicationController def in resp = request.env['omniauth.auth']
google_user = { 'user_id' => current_user.id.to_s, 'credentials' => resp.credentials,
'google_id' => resp.uid, 'google_email' => resp.info.email,
'created_at' => Time.now.to_i, 'updated_at' => Time.now.to_i }
$dynamodb_google_users.put_item(item: google_user)
redirect_to( settings_path, notice: "Linked with Google! You can now export raw run data to Google Sheets from run stats pages." ) end
def unlink $dynamodb_google_users.delete_item( key: { user_id: current_user.id.to_s } )
redirect_to settings_path, notice: "Google account unlinked :]" end
def failure redirect_to redirect_path, alert: "Error: #{params[:message]}" endend