2017-12-04 18:22:58 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class Production extends Vn\Web\JsonRequest
|
|
|
|
{
|
|
|
|
const PARAMS = ['deviceId'];
|
|
|
|
|
|
|
|
function run ($db)
|
|
|
|
{
|
2018-01-17 11:49:09 +00:00
|
|
|
$row = $db->getObject (
|
|
|
|
'SELECT displayText, status
|
|
|
|
FROM vn.routeGate WHERE deviceId = #',
|
|
|
|
[$_REQUEST['deviceId']]
|
|
|
|
);
|
2017-12-04 18:22:58 +00:00
|
|
|
|
2018-01-17 11:49:09 +00:00
|
|
|
if (!isset($row))
|
|
|
|
throw new Vn\Lib\UserException ('Device not found');
|
2017-12-04 18:22:58 +00:00
|
|
|
|
2018-01-17 11:49:09 +00:00
|
|
|
return $row;
|
2017-12-04 18:22:58 +00:00
|
|
|
}
|
|
|
|
}
|