import bodyParser from 'body-parser';
import secretToken from './secretTokenMiddleware';

export default function registerMiddleware({ router, secret }) {
    if (!router) throw new Error('No router provided');

    router.use(bodyParser.urlencoded({ extended: true }));
    router.use(secretToken(secret));
}

@@ -205,16 +205,51 @@
 ded');%0A%0A
+    router.use(bodyParser.json());%0A
     rout

Add JSON bodyparser #11