mirror of
https://github.com/grocy/grocy.git
synced 2025-08-15 02:04:38 +00:00
Use default best before date when adding product through API
This commit is contained in:
@@ -67,7 +67,7 @@ class StockApiController extends BaseApiController
|
||||
throw new \Exception('An amount is required');
|
||||
}
|
||||
|
||||
$bestBeforeDate = date('Y-m-d');
|
||||
$bestBeforeDate = null;
|
||||
if (array_key_exists('best_before_date', $requestBody) && IsIsoDate($requestBody['best_before_date']))
|
||||
{
|
||||
$bestBeforeDate = $requestBody['best_before_date'];
|
||||
|
Reference in New Issue
Block a user