Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit e24ca71

Browse files
committed
feat: fixed overload function on decodeBody
1 parent a152ae7 commit e24ca71

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ export class Request extends ServerRequest implements APIRequest {
8787

8888
async decodeBody(type: "text"): Promise<string>
8989
async decodeBody(type: "json"): Promise<any>
90-
async decodeBody(type: "form-data"): Promise<FormDataBody> {
90+
async decodeBody(type: "form-data"): Promise<FormDataBody>
91+
async decodeBody(type: string): Promise<any> {
9192
if (type === "text") {
9293
try {
9394
const buff: Uint8Array = await Deno.readAll(this.body);
@@ -126,7 +127,6 @@ export class Request extends ServerRequest implements APIRequest {
126127
} catch (err) {
127128
console.error("Failed to parse the request form-data", err)
128129
}
129-
130130
}
131131
}
132132

0 commit comments

Comments
 (0)