mirror of
https://github.com/grocy/grocy.git
synced 2025-08-13 01:06:23 +00:00
Upgraded to PHP-CS-Fixer v3
This commit is contained in:
@@ -7,9 +7,8 @@ use Grocy\Services\StockService;
|
||||
|
||||
class PrintApiController extends BaseApiController
|
||||
{
|
||||
|
||||
public function PrintShoppingListThermal(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args) {
|
||||
|
||||
public function PrintShoppingListThermal(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_SHOPPINGLIST);
|
||||
@@ -17,13 +16,15 @@ class PrintApiController extends BaseApiController
|
||||
$params = $request->getQueryParams();
|
||||
|
||||
$listId = 1;
|
||||
if (isset($params['list'])) {
|
||||
if (isset($params['list']))
|
||||
{
|
||||
$listId = $params['list'];
|
||||
}
|
||||
|
||||
$printHeader = true;
|
||||
if (isset($params['printHeader'])) {
|
||||
$printHeader = ($params['printHeader'] === "true");
|
||||
if (isset($params['printHeader']))
|
||||
{
|
||||
$printHeader = ($params['printHeader'] === 'true');
|
||||
}
|
||||
$items = $this->getStockService()->GetShoppinglistInPrintableStrings($listId);
|
||||
return $this->ApiResponse($response, $this->getPrintService()->printShoppingList($printHeader, $items));
|
||||
|
Reference in New Issue
Block a user