fix: explicitly pick billingCustomer fields for workflow serialization (#97)

The full middleware context object passed as billingCustomer contained
non-serializable properties (Drizzle project result, TanStack internals)
that caused a DataCloneError in Miniflare's workflow binding during
Docker self-hosting.
This commit is contained in:
Ben Senescu 2026-04-08 00:21:28 -04:00 committed by Ben Senescu
parent fd3d9838fe
commit c9d212b8b8

View File

@ -18,7 +18,11 @@ export const startAudit = createServerFn({ method: "POST" })
.handler(async ({ data, context }) => {
const result = await AuditService.startAudit({
actorUserId: context.userId,
billingCustomer: context,
billingCustomer: {
organizationId: context.organizationId,
userEmail: context.userEmail,
userId: context.userId,
},
projectId: context.projectId,
startUrl: data.startUrl,
maxPages: data.maxPages,