From 6b0f2901f7b088825c60b068f18457ff9eb3fd5b Mon Sep 17 00:00:00 2001 From: cheetah Date: Sat, 20 Mar 2021 04:28:16 +0000 Subject: [PATCH] removed testcode --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 8ff57da..affbf04 100644 --- a/index.js +++ b/index.js @@ -19,7 +19,7 @@ const bodyParser = require('body-parser') const app = express() app.use(bodyParser.json()) /*app.get('/api/message/easy', async (req, res) => {})*/ -app.get('/api/message/advanced', async (req, res) => { +app.post('/api/message/advanced', async (req, res) => { if (!req.body.type) return res.status(500).json("ERROR: no msg type(simple,duplex)") if (!req.body.payload) return res.status(500).json("ERROR: no msg payload") if (!req.body.routing) return res.status(500).json("ERROR: no msg routing") @@ -28,4 +28,5 @@ app.get('/api/message/advanced', async (req, res) => { await types.MessageManager.Deliver(id) return res.json(id) }) + app.listen(3000) \ No newline at end of file