mirror of
https://github.com/xHyroM/waki.git
synced 2024-11-27 17:01:06 +01:00
perf: dont stringify everytime
This commit is contained in:
parent
de12eb244f
commit
fb60d0880c
1 changed files with 2 additions and 1 deletions
|
@ -38,7 +38,8 @@ export async function parseBody(request: Request): Promise<() => BodyInit> {
|
||||||
|
|
||||||
if (contentType === "application/json") {
|
if (contentType === "application/json") {
|
||||||
const data = await request.json();
|
const data = await request.json();
|
||||||
return () => JSON.stringify(data);
|
const stringified = JSON.stringify(data);
|
||||||
|
return () => stringified;
|
||||||
}
|
}
|
||||||
|
|
||||||
const text = await request.text();
|
const text = await request.text();
|
||||||
|
|
Loading…
Reference in a new issue