Skip to content

Commit

Permalink
Fix create checkout for users on another clusters
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubno committed Jan 22, 2025
1 parent 61cc00a commit 91b06e3
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions apps/web/src/components/Pricing/SwitchToProButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,9 @@ import Spinner from '@/components/Spinner'

import { TierActiveTag } from './TierActiveTag'
import { getBillingUrl } from '@/app/(dashboard)/dashboard/utils'
import { toast } from '@/components/ui/use-toast'

function createCheckout(domain: string, tierID: string, teamID: string) {
if (domain !== 'e2b.dev') {
console.error('Managing billing is allowed only at e2b.dev.')
toast({
title: 'Error',
description: 'Managing billing is allowed only at e2b.dev.',
})
}

return fetch(getBillingUrl(domain, '/checkouts'), {
return fetch(getBillingUrl('e2b.dev', '/checkouts'), {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Expand Down

0 comments on commit 91b06e3

Please sign in to comment.