21 lines
340 B
PHP
21 lines
340 B
PHP
<?php
|
|
|
|
class Production extends Vn\Web\JsonRequest
|
|
{
|
|
const PARAMS = ['deviceId'];
|
|
|
|
function run ($db)
|
|
{
|
|
$row = $db->getObject (
|
|
'SELECT displayText, status
|
|
FROM vn.routeGate WHERE deviceId = #',
|
|
[$_REQUEST['deviceId']]
|
|
);
|
|
|
|
if (!isset($row))
|
|
throw new Vn\Lib\UserException ('Device not found');
|
|
|
|
return $row;
|
|
}
|
|
}
|