chore: Remove method override middleware (#4315)

* chore: Remove method override middleware

* wip

* CodeQL

* max/min
This commit is contained in:
Tom Moor
2022-10-18 19:03:25 -04:00
committed by GitHub
parent 0da46321b8
commit 87e3f18e6d
32 changed files with 185 additions and 192 deletions

View File

@@ -7,11 +7,10 @@ export default function apiWrapper() {
const ok = ctx.status < 400;
if (
typeof ctx.body !== "string" &&
typeof ctx.body === "object" &&
!(ctx.body instanceof stream.Readable)
) {
ctx.body = {
// @ts-expect-error ts-migrate(2698) FIXME: Spread types may only be created from object types... Remove this comment to see the full error message
...ctx.body,
status: ctx.status,
ok,