mirror of
https://github.com/versia-pub/server.git
synced 2026-01-27 04:36:02 +01:00
please sir can i have some more logging
This commit is contained in:
parent
38b598b6b7
commit
c756686de5
|
|
@ -21,7 +21,6 @@ export class RequestParser {
|
||||||
* @throws Error if body is invalid
|
* @throws Error if body is invalid
|
||||||
*/
|
*/
|
||||||
async toObject<T>() {
|
async toObject<T>() {
|
||||||
console.log(await this.determineContentType());
|
|
||||||
try {
|
try {
|
||||||
switch (await this.determineContentType()) {
|
switch (await this.determineContentType()) {
|
||||||
case "application/json":
|
case "application/json":
|
||||||
|
|
@ -99,6 +98,8 @@ export class RequestParser {
|
||||||
const formData = await this.request.formData();
|
const formData = await this.request.formData();
|
||||||
const result: Partial<T> = {};
|
const result: Partial<T> = {};
|
||||||
|
|
||||||
|
console.log([...formData.entries()]);
|
||||||
|
|
||||||
for (const [key, value] of formData.entries()) {
|
for (const [key, value] of formData.entries()) {
|
||||||
if (value instanceof Blob) {
|
if (value instanceof Blob) {
|
||||||
result[key as keyof T] = value as T[keyof T];
|
result[key as keyof T] = value as T[keyof T];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue