Compare commits
2
Commits
5576946829
...
923f805d47
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
923f805d47 | ||
|
|
6e0a05c314 |
@@ -76,6 +76,8 @@ spec:
|
|||||||
value: "https://api.manoonoils.com/graphql/"
|
value: "https://api.manoonoils.com/graphql/"
|
||||||
- name: NEXT_PUBLIC_SITE_URL
|
- name: NEXT_PUBLIC_SITE_URL
|
||||||
value: "https://dev.manoonoils.com"
|
value: "https://dev.manoonoils.com"
|
||||||
|
- name: DASHBOARD_URL
|
||||||
|
value: "https://dashboard.manoonoils.com"
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: workspace
|
- name: workspace
|
||||||
mountPath: /workspace
|
mountPath: /workspace
|
||||||
@@ -108,6 +110,10 @@ spec:
|
|||||||
value: "https://api.manoonoils.com/graphql/"
|
value: "https://api.manoonoils.com/graphql/"
|
||||||
- name: NEXT_PUBLIC_SITE_URL
|
- name: NEXT_PUBLIC_SITE_URL
|
||||||
value: "https://dev.manoonoils.com"
|
value: "https://dev.manoonoils.com"
|
||||||
|
- name: DASHBOARD_URL
|
||||||
|
value: "https://dashboard.manoonoils.com"
|
||||||
|
- name: RESEND_API_KEY
|
||||||
|
value: "re_bewcjHuy_DHtksWVUxguj8vFzKiJZNkFi"
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: 500m
|
cpu: 500m
|
||||||
|
|||||||
@@ -412,14 +412,17 @@ export async function POST(request: NextRequest) {
|
|||||||
return NextResponse.json({ error: "Missing saleor-event header" }, { status: 400 });
|
return NextResponse.json({ error: "Missing saleor-event header" }, { status: 400 });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!SUPPORTED_EVENTS.includes(event)) {
|
// Normalize event to uppercase for comparison
|
||||||
console.log(`Event ${event} not supported, skipping`);
|
const normalizedEvent = event.toUpperCase();
|
||||||
|
|
||||||
|
if (!SUPPORTED_EVENTS.includes(normalizedEvent)) {
|
||||||
|
console.log(`Event ${event} (normalized: ${normalizedEvent}) not supported, skipping`);
|
||||||
return NextResponse.json({ success: true, message: "Event not supported" });
|
return NextResponse.json({ success: true, message: "Event not supported" });
|
||||||
}
|
}
|
||||||
|
|
||||||
const payload = body;
|
const payload = body;
|
||||||
|
|
||||||
await handleSaleorWebhook(event, payload);
|
await handleSaleorWebhook(normalizedEvent, payload);
|
||||||
|
|
||||||
return NextResponse.json({ success: true });
|
return NextResponse.json({ success: true });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user