support reboot
This commit is contained in:
parent
4fff644a1f
commit
1ad90b515e
3 changed files with 126 additions and 476 deletions
|
|
@ -42,6 +42,7 @@ function poll (req, res, next) {
|
|||
const cassettes = results.cassettes
|
||||
|
||||
const reboot = pid && reboots[deviceId] && reboots[deviceId] === pid
|
||||
console.log('DEBUG104: %j', {pid, reboot, reboots, pids, deviceId})
|
||||
const langs = config.machineLanguages
|
||||
|
||||
const locale = {
|
||||
|
|
@ -274,8 +275,8 @@ localApp.get('/pid', (req, res) => {
|
|||
})
|
||||
|
||||
localApp.post('/reboot', (req, res) => {
|
||||
const pid = req.body.pid
|
||||
const deviceId = req.body.deviceId
|
||||
const deviceId = req.query.device_id
|
||||
const pid = pids[deviceId] && pids[deviceId].pid
|
||||
|
||||
if (!deviceId || !pid) {
|
||||
return res.sendStatus(400)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue