From 2d7525b2f656edcdb2a99f2145f13842d4306a64 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 15 Apr 2018 13:20:52 +0900 Subject: [PATCH] Fix bug --- package.json | 2 +- src/server/activitypub.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index ecebd4695..de80b48cb 100644 --- a/package.json +++ b/package.json @@ -137,10 +137,10 @@ "js-yaml": "3.11.0", "jsdom": "11.7.0", "koa": "2.5.0", - "koa-body": "^2.5.0", "koa-bodyparser": "4.2.0", "koa-compress": "^2.0.0", "koa-favicon": "2.0.1", + "koa-json-body": "^5.3.0", "koa-mount": "3.0.0", "koa-multer": "1.0.2", "koa-router": "7.4.0", diff --git a/src/server/activitypub.ts b/src/server/activitypub.ts index 1682fc27d..e27e2552f 100644 --- a/src/server/activitypub.ts +++ b/src/server/activitypub.ts @@ -1,5 +1,5 @@ import * as Router from 'koa-router'; -const koaBody = require('koa-body'); +const json = require('koa-json-body'); const httpSignature = require('http-signature'); import { createHttp } from '../queue'; @@ -19,7 +19,7 @@ const router = new Router(); //#region Routing // inbox -router.post('/users/:user/inbox', koaBody(), ctx => { +router.post('/users/:user/inbox', json(), ctx => { let signature; ctx.req.headers.authorization = 'Signature ' + ctx.req.headers.signature;