please sir can i have some more logging

This commit is contained in:
Jesse Wierzbinski 2024-04-14 02:53:31 -10:00
parent 38b598b6b7
commit c756686de5
No known key found for this signature in database

View file

@ -21,7 +21,6 @@ export class RequestParser {
* @throws Error if body is invalid
*/
async toObject<T>() {
console.log(await this.determineContentType());
try {
switch (await this.determineContentType()) {
case "application/json":
@ -99,6 +98,8 @@ export class RequestParser {
const formData = await this.request.formData();
const result: Partial<T> = {};
console.log([...formData.entries()]);
for (const [key, value] of formData.entries()) {
if (value instanceof Blob) {
result[key as keyof T] = value as T[keyof T];