From 8733ae17e753da67cb9f7370caa04d025efb9ac6 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Mon, 16 Nov 2020 22:30:51 +0100 Subject: [PATCH] Forgot to save before last commit... --- controllers/StockApiController.php | 10 ---- grocy.openapi.json | 94 ------------------------------ routes.php | 2 - 3 files changed, 106 deletions(-) diff --git a/controllers/StockApiController.php b/controllers/StockApiController.php index 6f5bb067..7b1608d6 100644 --- a/controllers/StockApiController.php +++ b/controllers/StockApiController.php @@ -763,16 +763,6 @@ class StockApiController extends BaseApiController } } - public function Journal(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args) - { - return $this->FilteredApiResponse($response, $this->getDatabase()->uihelper_stock_journal(), $request->getQueryParams()); - } - - public function JournalSummary(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args) - { - return $this->FilteredApiResponse($response, $this->getDatabase()->uihelper_stock_journal_summary(), $request->getQueryParams()); - } - public function __construct(\DI\Container $container) { parent::__construct($container); diff --git a/grocy.openapi.json b/grocy.openapi.json index fc447ca0..bdf4fd3a 100644 --- a/grocy.openapi.json +++ b/grocy.openapi.json @@ -2920,100 +2920,6 @@ } } }, - "/stock/journal": { - "get": { - "summary": "Returns the stock journal", - "tags": [ - "Stock" - ], - "parameters": [ - { - "$ref": "#/components/parameters/query" - }, - { - "$ref": "#/components/parameters/order" - }, - { - "$ref": "#/components/parameters/limit" - }, - { - "$ref": "#/components/parameters/offset" - } - ], - "responses": { - "200": { - "description": "An array of StockJournal objects", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StockJournal" - } - } - } - } - }, - "500": { - "description": "The operation was not successful (possible errors are invalid field names or conditions in filter parameters provided)", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error500" - } - } - } - } - } - } - }, - "/stock/journal/summary": { - "get": { - "summary": "Returns the stock journal summary (summarized transactions per product, transaction type and user + summarized amount)", - "tags": [ - "Stock" - ], - "parameters": [ - { - "$ref": "#/components/parameters/query" - }, - { - "$ref": "#/components/parameters/order" - }, - { - "$ref": "#/components/parameters/limit" - }, - { - "$ref": "#/components/parameters/offset" - } - ], - "responses": { - "200": { - "description": "An array of StockJournalSummary objects", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StockJournalSummary" - } - } - } - } - }, - "500": { - "description": "The operation was not successful (possible errors are invalid field names or conditions in filter parameters provided)", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error500" - } - } - } - } - } - } - }, "/stock/barcodes/external-lookup/{barcode}": { "get": { "summary": "Executes an external barcode lookoup via the configured plugin with the given barcode", diff --git a/routes.php b/routes.php index 8b4c4a2f..f1a912e3 100644 --- a/routes.php +++ b/routes.php @@ -202,8 +202,6 @@ $app->group('/api', function (RouteCollectorProxy $group) { $group->get('/stock/transactions/{transactionId}', '\Grocy\Controllers\StockApiController:StockTransactions'); $group->post('/stock/transactions/{transactionId}/undo', '\Grocy\Controllers\StockApiController:UndoTransaction'); $group->get('/stock/barcodes/external-lookup/{barcode}', '\Grocy\Controllers\StockApiController:ExternalBarcodeLookup'); - $group->get('/stock/journal', '\Grocy\Controllers\StockApiController:Journal'); - $group->get('/stock/journal/summary', '\Grocy\Controllers\StockApiController:JournalSummary'); } // Shopping list