From 42a14508f6ee3a9aef374e8a8695230b3839dcb2 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 27 Sep 2019 05:50:34 +0900 Subject: Update dependencies :rocket: --- src/server/api/api-handler.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/api/api-handler.ts') diff --git a/src/server/api/api-handler.ts b/src/server/api/api-handler.ts index 2de6994f32..a3be1f2aae 100644 --- a/src/server/api/api-handler.ts +++ b/src/server/api/api-handler.ts @@ -6,7 +6,7 @@ import call from './call'; import { ApiError } from './error'; export default (endpoint: IEndpoint, ctx: Koa.BaseContext) => new Promise((res) => { - const body = ctx.is('multipart/form-data') ? (ctx.req as any).body : ctx.request.body; + const body = ctx.request.body; const reply = (x?: any, y?: ApiError) => { if (x == null) { @@ -31,7 +31,7 @@ export default (endpoint: IEndpoint, ctx: Koa.BaseContext) => new Promise((res) // Authentication authenticate(body['i']).then(([user, app]) => { // API invoking - call(endpoint.name, user, app, body, (ctx.req as any).file).then((res: any) => { + call(endpoint.name, user, app, body, (ctx as any).file).then((res: any) => { reply(res); }).catch((e: ApiError) => { reply(e.httpStatusCode ? e.httpStatusCode : e.kind == 'client' ? 400 : 500, e); -- cgit v1.2.3-freya