mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 04:50:59 +00:00
fix(gamification): exclude soft-deleted measurements in achievement queries
v1.4.41 W-DELETED-2 — achievement progress now scopes the measurement read to deletedAt: null so deleting a row immediately rolls back any streak or count badge it had earned, matching the analytics + dashboard sweeps from v1.4.40.
This commit is contained in:
1 parent
5296a6122f
commit
cb8f74e4fa
1 file changed
+4
@@ -536,6 +536,10 @@ async function buildAchievementsResult(user: AuthedUser) {
|
||||
type: {
|
||||
in: ["WEIGHT", "BLOOD_PRESSURE_SYS", "BLOOD_PRESSURE_DIA", "PULSE"],
|
||||
},
|
||||
// v1.4.41 W-DELETED-2 — soft-deleted measurements are excluded
|
||||
// from achievement progress so deleting a row immediately rolls
|
||||
// back any streak / count badge it earned.
|
||||
deletedAt: null,
|
||||
},
|
||||
select: {
|
||||
type: true,
|
||||
|
||||
Reference in new issue
Block a user