datewise/app/routes/proxy.hold.tsx
metatroncubeswdev e56182e0e3 chore: initial Datewise app (rebranded from SlotSure prototype)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 20:06:49 -04:00

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);
});