9 lines
440 B
TypeScript
9 lines
440 B
TypeScript
import type { ActionFunctionArgs } from "react-router";
|
|
import { z } from "zod";
|
|
import { proxyHandler } from "../lib/proxy.server";
|
|
import { releaseSelection } from "../services/storefront.server";
|
|
|
|
// POST /apps/datewise/release { token }
|
|
export const action = ({ request }: ActionFunctionArgs) =>
|
|
proxyHandler(request, 30, ({ shop, body }) => releaseSelection(shop, z.object({ token: z.string().min(8).max(80) }).parse(body).token));
|