app/controllers/skydrive/ember_controller.rb in lti_skydrive-1.0.6 vs app/controllers/skydrive/ember_controller.rb in lti_skydrive-1.0.7

- old
+ new

@@ -3,15 +3,36 @@ module Skydrive class EmberController < ApplicationController def index end + def new_authentication + @account = Account.new + render layout: false + end + + def generate_authentication + @account = Account.new(account_params) + @account.key = SecureRandom.uuid + @account.secret = SecureRandom.hex + if !@account.save + render 'new_authentication', layout: false + end + render layout: false + end + def health_check begin ApiKey.count head 200 rescue head 500 end + end + + private + + def account_params + params.require(:account).permit(:name, :email, :institution, :title) end end end