diff --git a/changelog/62_3.1.0_2021-07-16.md b/changelog/62_3.1.0_2021-07-16.md index 6703f6e4..97b24b44 100644 --- a/changelog/62_3.1.0_2021-07-16.md +++ b/changelog/62_3.1.0_2021-07-16.md @@ -114,6 +114,8 @@ ### API improvements/fixes > ❗ Numbers are now returned as numbers (so technically without quotes around them, were strings for nearly all endpoints before - should practically be no real difference) +> +> => ❗❗❗ This has been reverted after this (v3.1.0) release since it had unintended side effects - Added a new endpoint `/system/localization-strings` to get the localization strings (gettext JSON representation; in the by the user desired language) - Added a new endpoint `/recipes/{recipeId}/copy` to copy a recipe - The `GET /chores` endpoint now also returns the `next_execution_assigned_user` object per chore (like the endpoint `GET /chores​/{choreId}` already did for a single chore) diff --git a/changelog/63_UNRELEASED_xxxx.xx.xx.md b/changelog/63_UNRELEASED_xxxx.xx.xx.md index 82de7574..e15f8134 100644 --- a/changelog/63_UNRELEASED_xxxx.xx.xx.md +++ b/changelog/63_UNRELEASED_xxxx.xx.xx.md @@ -2,12 +2,15 @@ - Fixed that when having any "Track date only" chore on the calendar, the iCal export was broken - Fixed that the upgrade failed when having unsupported parent/child product nesting levels - More information on this: Only 1 level is currently supported; creating > 1 level nestings was _never_ possible via the UI/frontend, but not checked/enforced by the backend before `v3.0.0` - so it was potentially possible via the API (or any third party app/tool which utilizes it) to create such a nesting which then made this upgrade to fail -- Fixed that the "Stock by-barcode" API routes were broken (thanks @larsverp) -- Fixed that the "Stock by-barcode" API routes also accepted chore or battery grocycodes (thanks @lowlee) - Fixed that it was not possible to select a chore/battery on the corresponding tracking pages by mouse/touch - Fixed that grouping by columns in tables may caused duplicate groups - Fixed that grocycode camera barcode scanning didn't recognize the scanned code for chore/battery tracking +- Optimized the meal plan page to be properly printable (thanks @MrKrisKrisu) + +### API +> ❗ The release before (v3.1.0) introduced that "numbers are now returned as numbers": **This was reverted** since it had unintended side effects (so all fields are technically strings now again, just like before - sorry for that) - Fixed that `missing_products` of the `/stock/volatile` endpoint also returned incactive products - Fixed that when having multiple Userfields for an entity, the `/objects/{entity}` endpoint returned wrong Userfield values - Fixed that the `/stock/products/by-barcode/{barcode}/consume` and `/stock/products/by-barcode/{barcode}/transfer` haven't used the stock entry given by a stock entry grocycode (thanks @lowlee for the initial work on this) -- Optimized the meal plan page to be properly printable (thanks @MrKrisKrisu) +- Fixed that the "Stock by-barcode" API routes were broken (thanks @larsverp) +- Fixed that the "Stock by-barcode" API routes also accepted chore or battery grocycodes (thanks @lowlee) diff --git a/controllers/BaseApiController.php b/controllers/BaseApiController.php index 7fecc207..e9c2d82c 100644 --- a/controllers/BaseApiController.php +++ b/controllers/BaseApiController.php @@ -21,7 +21,7 @@ class BaseApiController extends BaseController $response = $response->withHeader('Cache-Control', 'max-age=2592000'); } - $response->getBody()->write(json_encode($data, JSON_NUMERIC_CHECK)); + $response->getBody()->write(json_encode($data)); return $response; }