Skip to content

Commit

Permalink
Merge pull request #395 from ymaheshwari1/#85zrpqhmn
Browse files Browse the repository at this point in the history
Fixed: issue of webhook not working after successful subscription(#85zrpqhmn)
  • Loading branch information
adityasharma7 authored Mar 2, 2023
2 parents 044f4ef + a17216e commit 03694f4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/services/WebhookService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ const webhookParameters = {
} as any

const subscribeWebhook = async (payload: any, id: string): Promise <any> => {
let baseURL = store.getters['user/getInstanceUrl'];
baseURL = baseURL && baseURL.startsWith('http') ? baseURL.replace('api/', "") : `https://${baseURL}.hotwax.io/`;

const webhookParameter = webhookParameters[id]
const topic = webhookParameter.topic;
const endpoint = webhookParameter.endpoint;
Expand All @@ -62,7 +59,7 @@ const subscribeWebhook = async (payload: any, id: string): Promise <any> => {
return;
}
payload['topic'] = topic;
payload['endpoint'] = baseURL + 'shopify/' + endpoint;
payload['endpoint'] = endpoint;

return api ({
url: 'service/subscribeShopifyWebhook',
Expand Down

0 comments on commit 03694f4

Please sign in to comment.