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