summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-04-15 13:20:52 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-04-15 13:20:52 +0900
commit2d7525b2f656edcdb2a99f2145f13842d4306a64 (patch)
tree1bc7a3a7600b8ce1a0d86e294a29c1aa1436c072
parentFix bug (diff)
downloadsharkey-2d7525b2f656edcdb2a99f2145f13842d4306a64.tar.gz
sharkey-2d7525b2f656edcdb2a99f2145f13842d4306a64.tar.bz2
sharkey-2d7525b2f656edcdb2a99f2145f13842d4306a64.zip
Fix bug
-rw-r--r--package.json2
-rw-r--r--src/server/activitypub.ts4
2 files changed, 3 insertions, 3 deletions
diff --git a/package.json b/package.json
index ecebd4695b..de80b48cb8 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 1682fc27d4..e27e2552f3 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;