removed testcode
This commit is contained in:
parent
a75c7b727c
commit
6b0f2901f7
1 changed files with 2 additions and 1 deletions
3
index.js
3
index.js
|
@ -19,7 +19,7 @@ const bodyParser = require('body-parser')
|
||||||
const app = express()
|
const app = express()
|
||||||
app.use(bodyParser.json())
|
app.use(bodyParser.json())
|
||||||
/*app.get('/api/message/easy', async (req, res) => {})*/
|
/*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.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.payload) return res.status(500).json("ERROR: no msg payload")
|
||||||
if (!req.body.routing) return res.status(500).json("ERROR: no msg routing")
|
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)
|
await types.MessageManager.Deliver(id)
|
||||||
return res.json(id)
|
return res.json(id)
|
||||||
})
|
})
|
||||||
|
|
||||||
app.listen(3000)
|
app.listen(3000)
|
Loading…
Add table
Reference in a new issue