Skip to content

Commit 3d8609b

Browse files
committed
feat: save quantity
1 parent 3fd6c43 commit 3d8609b

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/common/paddle/recruiter/processing.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ export const createOpportunitySubscription = async ({
101101
items: data.items.map((item) => {
102102
return {
103103
priceId: item.price.id,
104+
quantity: item.quantity,
104105
};
105106
}),
106107
}),

src/common/schema/opportunities.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,9 @@ export const recruiterSubscriptionFlagsSchema = z
295295
priceId: z.string({
296296
error: 'Price ID is required',
297297
}),
298+
quantity: z.number().int().min(1, {
299+
error: 'Quantity must be at least 1',
300+
}),
298301
}),
299302
{
300303
error: 'At least one subscription item is required',

0 commit comments

Comments
 (0)