Add Billing link (#4668)

This commit is contained in:
Hariom Balhara authored and GitHub committed 2022-09-22 15:33:59 +00:00
1 parent f628ac4366
commit c5fc3a7e8e
3 files changed
+9 -4

No files matched your search

@@ -4,7 +4,7 @@ import { getStripeCustomerIdFromUserId } from "../lib/customer";
import stripe from "../lib/server";
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
if (req.method === "POST") {
if (req.method === "POST" || req.method === "GET") {
const customerId = await getStripeCustomerIdFromUserId(req.session!.user.id);
if (!customerId) {