MCPcopy Create free account
hub / github.com/CodebuffAI/codebuff / fetchBillingStatus

Function fetchBillingStatus

web/src/hooks/use-organization-data.ts:40–49  ·  view source on GitHub ↗
(orgId: string)

Source from the content-addressed store, hash-verified

38}
39
40const fetchBillingStatus = async (orgId: string): Promise<BillingStatus> => {
41 const response = await fetch(`/api/orgs/${orgId}/billing/setup`)
42
43 if (!response.ok) {
44 const error = await response.json()
45 throw new Error(error.error || 'Failed to fetch billing status')
46 }
47
48 return response.json()
49}
50
51export function useOrganizationData(orgSlug: string) {
52 const { status } = useSession()

Callers 1

useOrganizationDataFunction · 0.70

Calls 1

fetchFunction · 0.50

Tested by

no test coverage detected