fix: pass only required fields in workflow billingCustomer params (#123)
The callers of startAudit and beginRankCheckRun were forwarding the incoming billingCustomer object directly into workflow.create params. At runtime the object can be an EnsuredUserContext with extra fields beyond BillingCustomerContext, which pollutes the workflow instance's persisted params payload. Explicitly pick the four required fields so only the intended data is serialized into the workflow.
This commit is contained in:
parent
59d1dd24cb
commit
ed27b64eb4
@ -58,7 +58,12 @@ async function startAudit(input: {
|
||||
id: auditId,
|
||||
params: {
|
||||
auditId,
|
||||
billingCustomer: input.billingCustomer,
|
||||
billingCustomer: {
|
||||
userId: input.billingCustomer.userId,
|
||||
userEmail: input.billingCustomer.userEmail,
|
||||
organizationId: input.billingCustomer.organizationId,
|
||||
projectId: input.billingCustomer.projectId,
|
||||
},
|
||||
projectId: input.projectId,
|
||||
startUrl,
|
||||
config,
|
||||
|
||||
@ -116,7 +116,12 @@ export async function beginRankCheckRun(input: {
|
||||
params: {
|
||||
runId,
|
||||
configId: input.config.id,
|
||||
billingCustomer: input.billingCustomer,
|
||||
billingCustomer: {
|
||||
userId: input.billingCustomer.userId,
|
||||
userEmail: input.billingCustomer.userEmail,
|
||||
organizationId: input.billingCustomer.organizationId,
|
||||
projectId: input.billingCustomer.projectId,
|
||||
},
|
||||
projectId: input.projectId,
|
||||
domain: input.config.domain,
|
||||
locationCode: input.config.locationCode,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user