11 lines
492 B
TypeScript
11 lines
492 B
TypeScript
import type { ActionFunctionArgs } from "react-router";
|
|
import { proxyHandler } from "../lib/proxy.server";
|
|
import { holdSelection } from "../services/storefront.server";
|
|
|
|
// POST /apps/datewise/hold { lines, method, locationId, date, slot, token? }
|
|
export const action = ({ request }: ActionFunctionArgs) =>
|
|
proxyHandler(request, 30, async ({ shop, admin, body }) => {
|
|
if (!admin) return { ok: false, message: "App not installed" };
|
|
return holdSelection(shop, admin, body);
|
|
});
|