update webhook

master
TZGyn 1 year ago
parent 2d92c0d88f
commit 1c8f09e4dd
Signed by: TZGyn
GPG Key ID: 122EAF77AE81FD4A

@ -4,16 +4,9 @@ import { z } from 'zod'
export const POST = async ({ locals, request }) => { export const POST = async ({ locals, request }) => {
const type = request.headers.get('Content-Type') const type = request.headers.get('Content-Type')
if (type !== 'application/json') return new Response()
console.log('type', type) const body = await request.json()
const text = await request.text()
console.log('text', text)
const body = JSON.parse(text)
console.log('text', body)
const flatSchema = z.object({ const flatSchema = z.object({
type: z.literal('Flat'), type: z.literal('Flat'),

Loading…
Cancel
Save