diff --git a/src/withContent.ts b/src/withContent.ts index 92cc8af3..06c93d3c 100644 --- a/src/withContent.ts +++ b/src/withContent.ts @@ -1,11 +1,11 @@ -import {IRequest, IRequestStrict} from './Router' +import { IRequest, IRequestStrict } from './Router' + +export type HasContent = { + content: ContentType, +} & IRequestStrict // withContent - embeds any request body as request.content export const withContent = async (request: IRequest): Promise => { if (request.headers.get('content-type')?.includes('json')) request.content = await request.json() } - -export type HasContent = { - content: ContentType, -} & IRequestStrict