mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 13:01:00 +00:00
fix(privacy): store environment coordinates at 1 decimal instead of 2
The home location of the environment module was rounded to 2 decimals, about 1 km, which places a home in a neighbourhood rather than the town the schema comment promised. The weather archive it feeds is gridded at 9 to 25 km, so the extra precision bought nothing. Every stored coordinate of the module now goes through the same 1-decimal rounding (about 11 km north-south, 7 km east-west at 50° N): the home, the travel periods, the geocoder's results, the per-day weather rows, and a restore of a file written with finer values. Migration 0361 rounds the existing users, travel periods and per-day rows; running it twice changes nothing more. The answers keep their shape, plain numbers. The API descriptions and the schema comment say 1 decimal now.
This commit is contained in:
1 parent
b8e78a78b3
commit
f2e32afb24
12 files changed
+347
-46
No files matched your search
@@ -20693,8 +20693,8 @@ paths:
|
||||
- Environment
|
||||
summary: Set the coarse home location
|
||||
description: >-
|
||||
Stores the picked city and stamps the effective-from instant. Coordinates are rounded to 2 dp server-side
|
||||
regardless of what was sent.
|
||||
Stores the picked city and stamps the effective-from instant. Coordinates are rounded to 1 decimal (about 11 km)
|
||||
server-side regardless of what was sent.
|
||||
|
||||
|
||||
Re-stamping is the part worth knowing: EVERY write moves `since` to now, including one that changes only the
|
||||
@@ -20850,7 +20850,7 @@ paths:
|
||||
summary: Add a travel override
|
||||
description: >-
|
||||
Declares that the account was somewhere other than home for an inclusive date range; the days it covers resolve
|
||||
against this location instead. Coordinates are rounded to 2 dp server-side.
|
||||
against this location instead. Coordinates are rounded to 1 decimal (about 11 km) server-side.
|
||||
|
||||
|
||||
Adding one enqueues a refresh over exactly the declared window so its days re-resolve. Nothing checks for
|
||||
@@ -72713,10 +72713,10 @@ components:
|
||||
properties:
|
||||
lat:
|
||||
type: number
|
||||
description: Coarse latitude, rounded to 2 dp (~1 km).
|
||||
description: Coarse latitude, rounded to 1 decimal (about 11 km).
|
||||
lon:
|
||||
type: number
|
||||
description: Coarse longitude, rounded to 2 dp.
|
||||
description: Coarse longitude, rounded to 1 decimal.
|
||||
label:
|
||||
anyOf:
|
||||
- type: string
|
||||
@@ -72855,10 +72855,10 @@ components:
|
||||
properties:
|
||||
lat:
|
||||
type: number
|
||||
description: Coarse latitude, rounded to 2 dp.
|
||||
description: Coarse latitude, rounded to 1 decimal.
|
||||
lon:
|
||||
type: number
|
||||
description: Coarse longitude, rounded to 2 dp.
|
||||
description: Coarse longitude, rounded to 1 decimal.
|
||||
label:
|
||||
type: string
|
||||
description: Assembled from name, region and country, e.g. "City, Region, Country".
|
||||
|
||||
Reference in new issue
Block a user