removing sequential post, please add paralell requests if needed
This commit is contained in:
parent
49cad40f5e
commit
52daeeeee5
@ -50,22 +50,7 @@ app.post('/setlight', async function (request, responce) {
|
|||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
||||||
axios({
|
|
||||||
url: 'http://192.168.0.23:5000/setState',
|
|
||||||
method: 'post',
|
|
||||||
data: {
|
|
||||||
power: led_array.power,
|
|
||||||
brightness: led_array.brightness,
|
|
||||||
color: led_array.color
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
console.error(err)
|
|
||||||
responce.send({ success: false, error: "NETWORK" })
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
responce.send({ success: true, error: false })
|
responce.send({ success: true, error: false })
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user