mirror of
https://github.com/grocy/grocy.git
synced 2025-08-18 11:27:03 +00:00
Fixed API filter >=
and <=
comparison (fixes #1904)
This commit is contained in:
@@ -59,3 +59,4 @@
|
|||||||
- Endpoint `/stock/products/{productId}`: New field/property `default_consume_location` (contains the products default consume location object)
|
- Endpoint `/stock/products/{productId}`: New field/property `default_consume_location` (contains the products default consume location object)
|
||||||
- Endpoint `/stock/products/{productId}/add`: Fixed that the request body parameter `transaction_type` was ignored / always set to `purchase`
|
- Endpoint `/stock/products/{productId}/add`: Fixed that the request body parameter `transaction_type` was ignored / always set to `purchase`
|
||||||
- Fixed that the endpoint `/stock/products/by-barcode/{barcode}/open` didn't handle stock entries provided by a grocycode (thanks @jtommi)
|
- Fixed that the endpoint `/stock/products/by-barcode/{barcode}/open` didn't handle stock entries provided by a grocycode (thanks @jtommi)
|
||||||
|
- Fixed that less or equal (`<=`) and greater or equal (`>=`) filter comparisons didn't work (optional `query[]` request query parameter on most endpoints)
|
||||||
|
@@ -8,7 +8,7 @@ class BaseApiController extends BaseController
|
|||||||
{
|
{
|
||||||
const PATTERN_FIELD = '[A-Za-z_][A-Za-z0-9_]+';
|
const PATTERN_FIELD = '[A-Za-z_][A-Za-z0-9_]+';
|
||||||
|
|
||||||
const PATTERN_OPERATOR = '!?(=|~|<|>|(>=)|(<=)|(§))';
|
const PATTERN_OPERATOR = '!?((>=)|(<=)|=|~|<|>|(§))';
|
||||||
|
|
||||||
const PATTERN_VALUE = '[A-Za-z\p{L}\p{M}0-9*_.$#^| -\\\]+';
|
const PATTERN_VALUE = '[A-Za-z\p{L}\p{M}0-9*_.$#^| -\\\]+';
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user