Files
saleor-core-extensions/src/pages/api/register.ts
T
Unchained 33fb9a8452 feat: complete saleor core extensions app with React email templates
- Order confirmation, shipped, and cancelled email templates
- Uses @react-email/components for professional HTML emails
- Sends admin and customer notifications
- Integrates with Resend for email delivery
- Webhook handlers for ORDER_CREATED, ORDER_FULFILLED, ORDER_CANCELLED
- Docker image optimized for production
- Persistent auth data storage via PVC
2026-03-27 05:21:56 +02:00

21 lines
651 B
TypeScript

// Patch fetch to force HTTPS for api.manoonoils.com
const originalFetch = global.fetch;
global.fetch = async (input: RequestInfo | URL, init?: RequestInit) => {
let url = input.toString();
if (url.startsWith('http://api.manoonoils.com/')) {
url = url.replace('http://', 'https://');
input = url;
}
return originalFetch(input, init);
};
import { createAppRegisterHandler } from "@saleor/app-sdk/handlers/next";
import { saleorApp } from "@/saleor-app";
export default createAppRegisterHandler({
apl: saleorApp.apl,
allowedSaleorUrls: [
"https://api.manoonoils.com/graphql/",
"http://api.manoonoils.com/graphql/",
],
});