This commit is contained in:
syuilo 2022-06-26 17:38:50 +09:00 committed by Johann150
parent 570c08b976
commit 45b36e8059
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -7,7 +7,7 @@ import { ApiError } from './error.js';
export default (endpoint: IEndpoint, ctx: Koa.Context) => new Promise<void>((res) => { export default (endpoint: IEndpoint, ctx: Koa.Context) => new Promise<void>((res) => {
const body = ctx.is('multipart/form-data') const body = ctx.is('multipart/form-data')
? (ctx.req as any).body ? (ctx.request as any).body
: ctx.method === 'GET' : ctx.method === 'GET'
? ctx.query ? ctx.query
: ctx.request.body; : ctx.request.body;