working checkouts

This commit is contained in:
Shawn Erquhart
2025-02-20 13:52:42 -05:00
parent 92f33e47ca
commit 8e5643c183
8 changed files with 85 additions and 69 deletions

View File

@@ -11,10 +11,15 @@ export const MAX_FREE_TODOS = 3;
export const MAX_PREMIUM_TODOS = 6;
export const { generateCheckoutLink } = polar.checkoutApi({
products: {
premium: "5fde8344-5fca-4d0b-adeb-2052cddfd9ed",
premiumPlus: "db548a6f-ff8c-4969-8f02-5f7301a36e7c",
},
getUserInfo: async (ctx) => {
const user = await ctx.runQuery(api.example.getCurrentUser);
return {
userId: user._id,
email: user.email,
};
},
});