Skip to content

Commit

Permalink
remove unused comments and temporary bypass that made unit tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-liuu committed Oct 30, 2024
1 parent b2f136e commit bd368ce
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions lib/shopify_api/webhooks/registry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -221,18 +221,8 @@ def webhook_registration_needed?(client, registration)
"Failed to check if webhook was already registered" unless check_response.ok?

parsed_check_result = registration.parse_check_result(T.cast(check_response.body, T::Hash[String, T.untyped]))
must_register = parsed_check_result[:current_address] != registration.callback_address

# update this to check for more than just the current address
# must_register = parsed_check_result[:current_address] != registration.callback_address

must_register = true # TODO: remove and make a real check

# any subscription arg (depends on what kind of registration i.e. pubsub, http, eventbridge) has changed
# all 3 have these fields: callbackUrl, subscriptionArgs (which includes includeFields, metafieldNamespaces)
# but the structure of subscriptionArgs is different for each type of registration
#

# webhook_id is nil if the webhook is not registered. This leads to a create mutation instead of an update
{ webhook_id: parsed_check_result[:webhook_id], must_register: must_register }
end

Expand Down

0 comments on commit bd368ce

Please sign in to comment.