From d1a91edd184aed453ea4908a96b61bb4a1441b43 Mon Sep 17 00:00:00 2001 From: Alexander Lichter Date: Sat, 11 Nov 2023 19:08:02 -0500 Subject: [PATCH] wip --- src/utils/body.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/body.ts b/src/utils/body.ts index 83114922..9640793d 100644 --- a/src/utils/body.ts +++ b/src/utils/body.ts @@ -120,8 +120,8 @@ export function readRawBody( /** * Reads request body and tries to safely parse using [destr](https://github.com/unjs/destr). - * @param event {H3Event} H3 event passed by h3 handler - * @param encoding {Encoding} encoding="utf-8" - The character encoding to use. + * @param event H3 event passed by h3 handler + * @param encoding The character encoding to use, defaults to 'utf-8'. * * @return {*} The `Object`, `Array`, `String`, `Number`, `Boolean`, or `null` value corresponding to the request JSON body * @@ -162,7 +162,7 @@ export async function readBody< /** * Tries to read the request body via `readBody`, then uses the provided validation function and either throws a validation error or returns the result. - * @param event H3 event passed by h3 handler + * @param event The H3Event passed by the handler. * @param validate The function to use for body validation. It will be called passing the read request body. If the result is not false, the parsed body will be returned. * @throws If the validation function returns `false` or throws, a validation error will be thrown. * @return {*} The `Object`, `Array`, `String`, `Number`, `Boolean`, or `null` value corresponding to the request JSON body.