Skip to content

Commit

Permalink
🔥 Remove useless stripe env check for usage
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Mar 4, 2023
1 parent 852cc73 commit eb3ae8f
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions apps/builder/src/features/billing/api/procedures/getUsage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,6 @@ export const getUsage = authenticatedProcedure
z.object({ totalChatsUsed: z.number(), totalStorageUsed: z.number() })
)
.query(async ({ input: { workspaceId }, ctx: { user } }) => {
if (
!process.env.STRIPE_SECRET_KEY ||
!process.env.STRIPE_ADDITIONAL_CHATS_PRICE_ID ||
!process.env.STRIPE_ADDITIONAL_STORAGE_PRICE_ID
)
throw new TRPCError({
code: 'INTERNAL_SERVER_ERROR',
message: 'Stripe environment variables are missing',
})
const workspace = await prisma.workspace.findFirst({
where: {
id: workspaceId,
Expand Down

0 comments on commit eb3ae8f

Please sign in to comment.