refactor(#29): centralise stripe client

This commit is contained in:
OllyNicholass
2024-09-17 19:29:43 +01:00
parent 49a9b079ea
commit 9089aa270b
9 changed files with 20 additions and 31 deletions
+1 -3
View File
@@ -1,7 +1,5 @@
import { json } from '@sveltejs/kit';
import { PUBLIC_STRIPE_SECRET_KEY } from '$env/static/public';
import stripe from 'stripe';
const stripeClient = new stripe(PUBLIC_STRIPE_SECRET_KEY);
import { stripe as stripeClient } from '$lib/utils/stripe';
export const GET = async () => {
const products = await stripeClient.products.list({