diff --git a/src/routes/api/swell.ts b/src/routes/api/swell.ts index c8708d9..7e941a1 100644 --- a/src/routes/api/swell.ts +++ b/src/routes/api/swell.ts @@ -1,3 +1,4 @@ +import type { RequestEvent, RequestHandlerOutput } from '@sveltejs/kit' import { getProducts, getProduct, @@ -10,7 +11,7 @@ import { // Block GET requests -export async function get ({ url, body }) { +export async function get({}: RequestEvent): Promise { return { status: 403, body: 'nope!' @@ -21,7 +22,7 @@ export async function get ({ url, body }) { /** * POST request */ -export async function post ({ request, params }) { +export async function post ({ request }: RequestEvent): Promise { try { const body = await request.json() const { action, cartId, productId } = body