Skip to content

Commit

Permalink
fix: currency format
Browse files Browse the repository at this point in the history
  • Loading branch information
kweripx committed Jan 9, 2024
1 parent 9d23741 commit 609cedc
Show file tree
Hide file tree
Showing 14 changed files with 206 additions and 184 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const createCheckoutSession = authenticatedProcedure
email: z.string(),
company: z.string(),
workspaceId: z.string(),
currency: z.enum(['usd', 'eur']),
currency: z.enum(['usd', 'eur', 'brl']),
plan: z.enum([Plan.STARTER, Plan.PRO]),
returnUrl: z.string(),
vat: z
Expand Down Expand Up @@ -120,7 +120,7 @@ export const createCheckoutSession = authenticatedProcedure
type Props = {
customerId: string
workspaceId: string
currency: 'usd' | 'eur'
currency: 'usd' | 'eur' | 'brl'
plan: 'STARTER' | 'PRO'
returnUrl: string
userId: string
Expand Down
2 changes: 1 addition & 1 deletion apps/builder/src/features/billing/api/getSubscription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const getSubscription = authenticatedProcedure
status: subscriptionSchema.shape.status.parse(
currentSubscription.status
),
currency: currentSubscription.currency as 'usd' | 'eur',
currency: currentSubscription.currency as 'usd' | 'eur' | 'brl',
cancelDate: currentSubscription.cancel_at
? new Date(currentSubscription.cancel_at * 1000)
: undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const updateSubscription = authenticatedProcedure
returnUrl: z.string(),
workspaceId: z.string(),
plan: z.enum([Plan.STARTER, Plan.PRO]),
currency: z.enum(['usd', 'eur']),
currency: z.enum(['usd', 'eur', 'brl']),
})
)
.output(
Expand Down
Loading

1 comment on commit 609cedc

@vercel
Copy link

@vercel vercel bot commented on 609cedc Jan 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.