Skip to content

Commit a3b6cbb

Browse files
committed
deprecate checkoutApi, avoid breaking
1 parent 5ab6837 commit a3b6cbb

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

example/convex/example.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const {
6464

6565
// Cancels the current subscription.
6666
cancelCurrentSubscription,
67-
} = polar.api();
67+
} = polar.checkoutApi();
6868

6969
// In a real app you'll set up authentication, we just use a
7070
// fake user for the example.

src/client/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,10 @@ export class Polar<
301301
}),
302302
};
303303
}
304+
// Deprecated: use api() instead
305+
checkoutApi() {
306+
return this.api();
307+
}
304308
registerRoutes(
305309
http: HttpRouter,
306310
{

0 commit comments

Comments
 (0)