This commit is contained in:
Manav Rathi
2024-11-06 15:32:45 +05:30
parent 7fc692312c
commit 565dce5a1d

View File

@@ -32,7 +32,9 @@ const Subscription = z.object({
.nullish()
.transform(nullToUndefined),
price: z.string(),
period: PlanPeriod,
// TODO: We get back subscriptions without a period on cancel / reactivate.
// Handle them better, or remove this TODO.
period: z.enum(["month", "year", ""]).transform((s) => (s ? s : "month")),
});
/**