Forgot to save before last commit...

This commit is contained in:
Bernd Bestel 2020-11-16 22:30:51 +01:00
parent 512ef745da
commit 8733ae17e7
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
3 changed files with 0 additions and 106 deletions

View File

@ -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) public function __construct(\DI\Container $container)
{ {
parent::__construct($container); parent::__construct($container);

View File

@ -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}": { "/stock/barcodes/external-lookup/{barcode}": {
"get": { "get": {
"summary": "Executes an external barcode lookoup via the configured plugin with the given barcode", "summary": "Executes an external barcode lookoup via the configured plugin with the given barcode",

View File

@ -202,8 +202,6 @@ $app->group('/api', function (RouteCollectorProxy $group) {
$group->get('/stock/transactions/{transactionId}', '\Grocy\Controllers\StockApiController:StockTransactions'); $group->get('/stock/transactions/{transactionId}', '\Grocy\Controllers\StockApiController:StockTransactions');
$group->post('/stock/transactions/{transactionId}/undo', '\Grocy\Controllers\StockApiController:UndoTransaction'); $group->post('/stock/transactions/{transactionId}/undo', '\Grocy\Controllers\StockApiController:UndoTransaction');
$group->get('/stock/barcodes/external-lookup/{barcode}', '\Grocy\Controllers\StockApiController:ExternalBarcodeLookup'); $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 // Shopping list