Skip to content

Commit

Permalink
fix: check default stripe env key
Browse files Browse the repository at this point in the history
  • Loading branch information
johackim committed Jun 6, 2023
1 parent e164633 commit f559519
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default async (req) => {

const user = await isAuthenticated(token, process.env.JWT_SECRET);

if (!process.env.STRIPE_SECRET_KEY) {
if (!process.env.STRIPE_SECRET_KEY || process.env.STRIPE_SECRET_KEY === 'sk_test_1234') {
return new NextResponse(
JSON.stringify({ success: false, message: 'Stripe secret key is not set' }),
{ status: 500, headers: { 'Content-Type': 'application/json' } },
Expand Down

0 comments on commit f559519

Please sign in to comment.