fix: coalesce falsy body to {} (#4929)
This commit is contained in:
@@ -7,6 +7,7 @@ import userAgent, { UserAgentContext } from "koa-useragent";
|
||||
import env from "@server/env";
|
||||
import { NotFoundError } from "@server/errors";
|
||||
import Logger from "@server/logging/Logger";
|
||||
import coalesceBody from "@server/middlewares/coaleseBody";
|
||||
import { AppState, AppContext } from "@server/types";
|
||||
import apiKeys from "./apiKeys";
|
||||
import attachments from "./attachments";
|
||||
@@ -45,6 +46,7 @@ api.use(
|
||||
},
|
||||
})
|
||||
);
|
||||
api.use(coalesceBody());
|
||||
api.use<BaseContext, UserAgentContext>(userAgent);
|
||||
api.use(apiWrapper());
|
||||
api.use(editor());
|
||||
|
||||
Reference in New Issue
Block a user