mirror of
https://github.com/jcreek/SvelteKitSaasBoilerplate.git
synced 2026-07-13 02:53:50 +00:00
fix(*): Prevent CORS errors with subscriptions
This commit is contained in:
@@ -15,8 +15,9 @@ export const POST: RequestHandler = async ({ request, cookies, locals: { safeGet
|
||||
const userId = session.user.id;
|
||||
const userEmail = session.user.email;
|
||||
|
||||
// Get the price ID from the request body
|
||||
const { priceId } = await request.json();
|
||||
// Get the price ID from the request form data
|
||||
const formData = await request.formData();
|
||||
const priceId = formData.get('priceId');
|
||||
|
||||
if (!priceId) {
|
||||
return new Response('Price ID is required', { status: 400 });
|
||||
|
||||
Reference in New Issue
Block a user