mirror of
https://github.com/xHyroM/waki.git
synced 2024-11-14 03:18: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") {
|
||||
const data = await request.json();
|
||||
return () => JSON.stringify(data);
|
||||
const stringified = JSON.stringify(data);
|
||||
return () => stringified;
|
||||
}
|
||||
|
||||
const text = await request.text();
|
||||
|
|
Loading…
Reference in a new issue