hedera-web/rest/misc/production.php

21 lines
340 B
PHP
Raw Normal View History

<?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']]
);
2018-01-17 11:49:09 +00:00
if (!isset($row))
throw new Vn\Lib\UserException ('Device not found');
2018-01-17 11:49:09 +00:00
return $row;
}
}