From 90983f92654dc52ccbe955af1ec5b94f7ea1cbb8 Mon Sep 17 00:00:00 2001 From: David Nahodyl Date: Fri, 7 Jun 2024 11:50:35 -0400 Subject: [PATCH] cleanup --- src/runtime/server/utils/definePrecognitionEventHandler.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/runtime/server/utils/definePrecognitionEventHandler.ts b/src/runtime/server/utils/definePrecognitionEventHandler.ts index 4024721..a7c24b7 100644 --- a/src/runtime/server/utils/definePrecognitionEventHandler.ts +++ b/src/runtime/server/utils/definePrecognitionEventHandler.ts @@ -1,7 +1,7 @@ import { type EventHandler, type EventHandlerRequest, type H3Event, setResponseHeader, setResponseStatus } from 'h3' import type { ZodSchema, ZodObject } from 'zod' import { z } from 'zod' -import { readBody, defineEventHandler } from 'h3' +import { defineEventHandler } from 'h3' import getValidatedInput from './getValidatedInput' const precognitionEventHandler = ( @@ -13,8 +13,6 @@ const precognitionEventHandler = ( console.log('starting precognition event handler') const headers = getHeaders(event) - const body = await readBody(event) - if (!headers.precognition) { // this is not a precognition event // return the regular response