diff --git a/src/routes/webhook/tradingview/+server.ts b/src/routes/webhook/tradingview/+server.ts index df1129e..4d0b1cf 100644 --- a/src/routes/webhook/tradingview/+server.ts +++ b/src/routes/webhook/tradingview/+server.ts @@ -4,16 +4,9 @@ import { z } from 'zod' export const POST = async ({ locals, request }) => { const type = request.headers.get('Content-Type') + if (type !== 'application/json') return new Response() - console.log('type', type) - - const text = await request.text() - - console.log('text', text) - - const body = JSON.parse(text) - - console.log('text', body) + const body = await request.json() const flatSchema = z.object({ type: z.literal('Flat'),