feat: 更改请求参数
This commit is contained in:
parent
391bdc2f2c
commit
542f97a17e
@ -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'
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user