hedera-web/rest/misc/production.php

19 lines
336 B
PHP
Raw Normal View History

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