added button to add expired products to shoppinglist (#1026)

* added button to add expired products to shoppinglist

* Localizations are managed via Transifex

Revert "added button to add expired products to shoppinglist"

This reverts commit ad1ab5d6a0.

* Revert unnecessary change

* Reuse existing function (GetExpiringProducts) to get expired products

Co-authored-by: Mario Klug <mario.klug@sourcefactory.at>
Co-authored-by: Bernd Bestel <bernd@berrnd.de>
This commit is contained in:
SourceFactory.at
2020-10-04 15:20:34 +02:00
committed by GitHub
parent 49588508bb
commit 617b25bda8
7 changed files with 116 additions and 0 deletions

View File

@@ -2356,6 +2356,48 @@
}
}
},
"/stock/shoppinglist/add-expired-products": {
"post": {
"summary": "Adds expired products to the given shopping list",
"tags": [
"Stock"
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"list_id": {
"type": "integer",
"description": "The shopping list to use, when omitted, the default shopping list (with id 1) is used"
}
},
"example": {
"list_id": 2
}
}
}
}
},
"responses": {
"204": {
"description": "The operation was successful"
},
"400": {
"description": "The operation was not successful (possible errors are: Not existing shopping list)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenericErrorResponse"
}
}
}
}
}
}
},
"/stock/shoppinglist/clear": {
"post": {
"summary": "Removes all items from the given shopping list",