Skip to content
Myr

refactor(utils/body): shorten the code (#3353)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Yusuke Wada · committed by GitHub · parent e4cc5aa · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:src/utils/body.ts+2 added-2 removed
99 unmodified lines
100 const headers = request instanceof HonoRequest ? request.raw.headers : request.headers101 const contentType = headers.get('Content-Type')102103 if (104 (contentType !== null && contentType.startsWith('multipart/form-data')) ||105 (contentType !== null && contentType.startsWith('application/x-www-form-urlencoded'))104 contentType?.startsWith('multipart/form-data') ||105 contentType?.startsWith('application/x-www-form-urlencoded')106 ) {107 return parseFormData(request, { all, dot })108 }109
116 unmodified lines