app/controllers/hyrax/api/zotero_controller.rb in hyrax-1.1.1 vs app/controllers/hyrax/api/zotero_controller.rb in hyrax-2.0.0.beta1

- old
+ new

@@ -22,13 +22,13 @@ access_token = current_token.get_access_token(oauth_verifier: params['oauth_verifier']) # parse userID and API key out of token and store in user instance current_user.zotero_userid = access_token.params[:userID] current_user.save Hyrax::Arkivo::CreateSubscriptionJob.perform_later(current_user) - redirect_to hyrax.profile_path(current_user), notice: 'Successfully connected to Zotero!' + redirect_to hyrax.dashboard_profile_path(current_user), notice: 'Successfully connected to Zotero!' rescue OAuth::Unauthorized - redirect_to hyrax.edit_profile_path(current_user.to_param), alert: 'Please re-authenticate with Zotero' + redirect_to hyrax.edit_dashboard_profile_path(current_user.to_param), alert: 'Please re-authenticate with Zotero' ensure current_user.zotero_token = nil current_user.save end @@ -40,13 +40,13 @@ return redirect_to root_url, alert: 'You are not authorized to perform this operation' end def validate_params if malformed_request? - redirect_to hyrax.edit_profile_path(current_user.to_param), + redirect_to hyrax.edit_dashboard_profile_path(current_user.to_param), alert: "Malformed request from Zotero" elsif invalid_token? - redirect_to hyrax.edit_profile_path(current_user.to_param), + redirect_to hyrax.edit_dashboard_profile_path(current_user.to_param), alert: "You have not yet connected to Zotero" end end def malformed_request?