fix: remove duplicate createTenantPaddleCheckout definition in api.ts
This commit is contained in:
@@ -2564,22 +2564,7 @@ export async function assignFreeTenantPackage(packageId: number): Promise<void>
|
||||
await jsonOrThrow(response, 'Failed to assign free package');
|
||||
}
|
||||
|
||||
export async function createTenantPaddleCheckout(packageId: number): Promise<{ checkout_url: string }> {
|
||||
const response = await authorizedFetch('/api/v1/tenant/packages/paddle-checkout', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({ package_id: packageId }),
|
||||
});
|
||||
|
||||
const data = await jsonOrThrow<{ checkout_url: string }>(response, 'Failed to create Paddle checkout');
|
||||
if (!data.checkout_url) {
|
||||
throw new Error('Missing Paddle checkout URL');
|
||||
}
|
||||
|
||||
return { checkout_url: data.checkout_url };
|
||||
}
|
||||
|
||||
export async function recordCreditPurchase(payload: {
|
||||
package_id: string;
|
||||
|
||||
Reference in New Issue
Block a user