Skip to content

Commit

Permalink
Applying comments from review
Browse files Browse the repository at this point in the history
  • Loading branch information
paulomarg committed Feb 9, 2024
1 parent e81bc92 commit a249323
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions app/controllers/shopify_app/callback_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ def user_access_scopes_strategy
end

def perform_post_authenticate_jobs(session)
# Ensure we use the offline session to install webhooks and scripttags
offline_session = session.online? ? shop_session : session
# Ensure we use the shop session to install webhooks and scripttags
session_for_shop = session.online? ? shop_session : session

install_webhooks(offline_session)
install_scripttags(offline_session)
install_webhooks(session_for_shop)
install_scripttags(session_for_shop)

perform_after_authenticate_job(session)
end
Expand Down
3 changes: 1 addition & 2 deletions test/controllers/callback_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,8 @@ class CallbackControllerTest < ActionController::TestCase

get :callback, params: @callback_params
assert_response 302
rescue => e
ensure
shop_storage.clear
raise e
end

test "#callback performs install_scripttags job after authentication" do
Expand Down

0 comments on commit a249323

Please sign in to comment.