summaryrefslogtreecommitdiff
path: root/src/server/api/index.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-04-13 11:44:39 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-04-13 11:44:39 +0900
commite2e7babee0de35385eb74830c82eaccdb28f013a (patch)
treef86755ab4c60ae63e43039945a07a7ce09bc7a8e /src/server/api/index.ts
parentwip (diff)
downloadsharkey-e2e7babee0de35385eb74830c82eaccdb28f013a.tar.gz
sharkey-e2e7babee0de35385eb74830c82eaccdb28f013a.tar.bz2
sharkey-e2e7babee0de35385eb74830c82eaccdb28f013a.zip
wip
Diffstat (limited to 'src/server/api/index.ts')
-rw-r--r--src/server/api/index.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/api/index.ts b/src/server/api/index.ts
index 2ea5fccb5b..009c99acae 100644
--- a/src/server/api/index.ts
+++ b/src/server/api/index.ts
@@ -14,7 +14,8 @@ const handler = require('./api-handler').default;
// Init app
const app = new Koa();
app.use(bodyParser({
- detectJSON: () => true
+ // リクエストが multipart/form-data でない限りはJSONだと見なす
+ detectJSON: ctx => !ctx.is('multipart/form-data')
}));
// Init multer instance