Return numbers as numbers on all API endpoints

This commit is contained in:
Bernd Bestel
2021-07-08 19:34:16 +02:00
parent 633b26bf7e
commit 14cd6ca3bf
2 changed files with 2 additions and 1 deletions

View File

@@ -79,6 +79,7 @@
- Fixed that the "Manage users" and "Manage API keys" menu was not shown when using reverse proxy authentication
### 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)
- Added a new API endpoint `/system/localization-strings` to get the localization strings (gettext JSON representation; in the by the user desired language)
- The `GET /chores` endpoint now also returns the `next_execution_assigned_user` per chore (like the endpoint `GET /chores/{choreId}` already did for a single chore)
- The `GET /tasks` endpoint now also returns the assigned user and category object per task

View File

@@ -26,7 +26,7 @@ class BaseApiController extends BaseController
$response = $response->withHeader('Cache-Control', 'max-age=2592000');
}
$response->getBody()->write(json_encode($data));
$response->getBody()->write(json_encode($data, JSON_NUMERIC_CHECK));
return $response;
}