From c20294a92db27a7cd61b5923e0bd8509ab7d80c0 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Wed, 24 Feb 2021 15:18:41 +0100 Subject: [PATCH] stripe env --- .../dashboard/src/pages/api/stripe/createCheckoutSession.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/dashboard/src/pages/api/stripe/createCheckoutSession.js b/packages/dashboard/src/pages/api/stripe/createCheckoutSession.js index 546b64f0..04d0954f 100644 --- a/packages/dashboard/src/pages/api/stripe/createCheckoutSession.js +++ b/packages/dashboard/src/pages/api/stripe/createCheckoutSession.js @@ -4,6 +4,8 @@ import { StatusCodes } from "http-status-codes"; const stripe = new Stripe(process.env.STRIPE_SECRET_KEY); export default async (req, res) => { + console.log(req.method); + if (req.method !== "POST") { return res.status(StatusCodes.NOT_FOUND).end(); }