Add Billing link (#4668)
This commit is contained in:
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) {
|
||||
|
||||
Reference in new issue
Block a user