diff options
author | Nick Van Doorn <vandoorn.nick@gmail.com> | 2019-01-21 19:07:36 -0800 |
---|---|---|
committer | Nick Van Doorn <vandoorn.nick@gmail.com> | 2019-01-21 19:07:36 -0800 |
commit | 1ec6b405f2d649620a7e54d69a1b7d344e310499 (patch) | |
tree | 41b497f4a1e16b31bc28ac4d48f5f06a4f29a055 | |
parent | c9de61397929b964c070aa4dc42b3821ed5ae6a4 (diff) |
Use JSON body parser
-rw-r--r-- | server/src/operations.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/server/src/operations.ts b/server/src/operations.ts index 32b3b75..0c19793 100644 --- a/server/src/operations.ts +++ b/server/src/operations.ts @@ -6,6 +6,7 @@ import { DatabaseChange } from "../../lib/database-change.model"; import { DatabaseInterface } from "naive-core"; import express, { RequestHandler } from "express"; +import bodyParser from "body-parser"; export const bindOperations = ( ctx: Context, @@ -44,6 +45,7 @@ export const bindOperations = ( }; const router = express(); + router.use(bodyParser.json()); router.post("/write", writeHandler); router .route("/subscribe") |