refactor: abstract site URL across email templates
- Add NEXT_PUBLIC_SITE_URL to .env.local - Update email templates to accept siteUrl prop - Update webhook handler to pass siteUrl from env var - Update create-webhooks.graphql with placeholder URL
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
# Replace YOUR_STOREFRONT_URL with your actual storefront URL
|
||||
# Dev: https://dev.manoonoils.com
|
||||
# Prod: https://manoonoils.com
|
||||
|
||||
mutation CreateSaleorWebhooks {
|
||||
orderConfirmedWebhook: webhookCreate(input: {
|
||||
name: "Resend - Order Confirmed"
|
||||
targetUrl: "https://manoonoils.com/api/webhooks/saleor"
|
||||
targetUrl: "YOUR_STOREFRONT_URL/api/webhooks/saleor"
|
||||
events: [ORDER_CONFIRMED]
|
||||
isActive: true
|
||||
}) {
|
||||
@@ -20,7 +24,7 @@ mutation CreateSaleorWebhooks {
|
||||
|
||||
orderPaidWebhook: webhookCreate(input: {
|
||||
name: "Resend - Order Paid"
|
||||
targetUrl: "https://manoonoils.com/api/webhooks/saleor"
|
||||
targetUrl: "YOUR_STOREFRONT_URL/api/webhooks/saleor"
|
||||
events: [ORDER_FULLY_PAID]
|
||||
isActive: true
|
||||
}) {
|
||||
@@ -39,7 +43,7 @@ mutation CreateSaleorWebhooks {
|
||||
|
||||
orderCancelledWebhook: webhookCreate(input: {
|
||||
name: "Resend - Order Cancelled"
|
||||
targetUrl: "https://manoonoils.com/api/webhooks/saleor"
|
||||
targetUrl: "YOUR_STOREFRONT_URL/api/webhooks/saleor"
|
||||
events: [ORDER_CANCELLED]
|
||||
isActive: true
|
||||
}) {
|
||||
@@ -58,7 +62,7 @@ mutation CreateSaleorWebhooks {
|
||||
|
||||
orderFulfilledWebhook: webhookCreate(input: {
|
||||
name: "Resend - Order Fulfilled"
|
||||
targetUrl: "https://manoonoils.com/api/webhooks/saleor"
|
||||
targetUrl: "YOUR_STOREFRONT_URL/api/webhooks/saleor"
|
||||
events: [ORDER_FULFILLED]
|
||||
isActive: true
|
||||
}) {
|
||||
|
||||
Reference in New Issue
Block a user