MCPcopy Create free account
hub / github.com/code-with-antonio/nightcode / openUpgradeCheckout

Function openUpgradeCheckout

packages/cli/src/lib/upgrade.ts:5–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import { getErrorMessage } from "./http-errors";
4
5export async function openUpgradeCheckout() {
6 const response = await apiClient.billing.checkout.$post();
7
8 if (response.ok) {
9 const data = await response.json();
10 await open(data.url);
11 return;
12 }
13
14 throw new Error(await getErrorMessage(response));
15};
16
17export async function openBillingPortal() {
18 const response = await apiClient.billing.portal.$post();

Callers 1

commands.tsxFile · 0.90

Calls 1

getErrorMessageFunction · 0.90

Tested by

no test coverage detected