()
| 15 | }; |
| 16 | |
| 17 | export async function openBillingPortal() { |
| 18 | const response = await apiClient.billing.portal.$post(); |
| 19 | |
| 20 | if (response.ok) { |
| 21 | const data = await response.json(); |
| 22 | await open(data.url); |
| 23 | return; |
| 24 | } |
| 25 | |
| 26 | throw new Error(await getErrorMessage(response)); |
| 27 | }; |
no test coverage detected