10 lines
414 B
TypeScript
10 lines
414 B
TypeScript
import type { ActionFunctionArgs } from "react-router";
|
|
import { authenticate } from "../shopify.server";
|
|
import { handleOrderFulfilled } from "../services/orders.server";
|
|
|
|
export const action = async ({ request }: ActionFunctionArgs) => {
|
|
const { shop, payload } = await authenticate.webhook(request);
|
|
await handleOrderFulfilled(shop, payload as { admin_graphql_api_id: string });
|
|
return new Response();
|
|
};
|