diff --git a/server/index.js b/server/index.js index cdc0429..bcbbee8 100644 --- a/server/index.js +++ b/server/index.js @@ -15,7 +15,7 @@ app.use(express.json()) app.post('/api/agv/getCurrentMapName', async (req, res) => { const request = { header: { - device_id: req.body.device_id || 'agv_src1100' + device_id: req.body.deviceId || 'agv_src1100' } }; @@ -49,7 +49,7 @@ app.post('/api/agv/getCurrentMap', async (req, res) => { const grpcClient = createAGVGrpcClient(req.body.ip) const request = { header: { - device_id: req.body.device_id || 'agv_src1100' + device_id: req.body.deviceId || 'agv_src1100' }, data: { map_name: req.body.mapName @@ -83,7 +83,7 @@ app.post('/api/agv/getCurrentMap', async (req, res) => { app.post('/api/agv/getRobotState', async (req, res) => { const request = { header: { - device_id: req.body.device_id || 'agv_src1100' + device_id: req.body.deviceId || 'agv_src1100' } }; @@ -144,7 +144,7 @@ app.post('/api/agv/moveRobot', async (req, res) => { const grpcClient = createAGVGrpcClient(req.body.ip) const request = { header: { - device_id: req.body.device_id || 'agv_src1100' + device_id: req.body.deviceId || 'agv_src1100' }, data: { vx: req.body.vx, @@ -185,7 +185,7 @@ app.post('/api/agv/stopRobot', async (req, res) => { const grpcClient = createAGVGrpcClient(req.body.ip) const request = { header: { - device_id: req.body.device_id || 'agv_src1100' + device_id: req.body.deviceId || 'agv_src1100' } };