fix(measurements): shape the single-measurement note so ciphertext never leaves the server

Wrap GET /api/measurements/:id through shapeMeasurementNotes like the list,
create, and update paths already do, so the encrypted note column is decrypted
into notes and the raw ciphertext is stripped from the response. Harden the
rotation-coverage guard to require both the field literal and the model
delegate, so a same-named encrypted column whose table is not rotated is caught.
This commit is contained in:
Marc-André Bombeck committed 2026-06-27 19:46:07 +02:00
1 parent 4d3a02cc1a
commit 9399b77a74
2 files changed
+22 -5

No files matched your search

+1 -1
View File
@@ -46,7 +46,7 @@ export const GET = apiHandler(
},
});
return apiSuccess(measurement);
return apiSuccess(shapeMeasurementNotes(measurement));
},
);