-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: pass empty Locations and PrivateLocations to backend [sc-23129] (#…
…125) * fix: remove omitempty from Locations and PrivateLocations When omitempty, the property is not sent to the server. Our PUT endpoints however act like PATCH would, meaning that partial updates are supported. When a property is not set, it is kept intact, even though the intention most likely was to remove it. * fix: always send empty [] for locations (public/private) even when not set If the backend does not receive a value, or receives a null value, it will not update the database. This is an issue for many other values too, but as an API level fix will be needed, for now this patch only addresses the fields we've received reports about. To make the patch a little easier, Create now calls CreateCheck, Update UpdateCheck and Delete DeleteCheck. The latter two were already equivalent. Create and CreateCheck had some differences (mainly that that former would send the request to /v1/checks instead of /v1/checks/<type>), but given how CreateCheck covers all check types, there should be no difference. * chore: update tests, these need a complete overhaul though * fix: keep using /v1/checks for Create after all as it behaves differently
- Loading branch information
Showing
3 changed files
with
75 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters