Rocky_Mountain_Vending/.pnpm-store/v10/files/b9/8eee27601e77b606006248996353bea6954e3a935762298f835d32f2d8b7423968ed0514997cf93b19f3f3518de579f5283c909c589321c331b5e734af6156
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

14 lines
545 B
Text

export const serializerMiddleware = (options, serializer) => (next, context) => async (args) => {
const endpointConfig = options;
const endpoint = context.endpointV2?.url && endpointConfig.urlParser
? async () => endpointConfig.urlParser(context.endpointV2.url)
: endpointConfig.endpoint;
if (!endpoint) {
throw new Error("No valid endpoint provider available.");
}
const request = await serializer(args.input, { ...options, endpoint });
return next({
...args,
request,
});
};