mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-13 06:32:03 +00:00
fix(backups): address restore review findings
This commit is contained in:
1 parent
7eb3b91925
commit
e9507a0c93
8 files changed
+29
-15
No files matched your search
@@ -100,7 +100,7 @@ const handler = apiHandler(
|
||||
details: { reason: "missing_confirmation", backupId: id },
|
||||
});
|
||||
return apiError(
|
||||
"Confirmation token missing — body must include confirm: 'RESTORE'",
|
||||
"Confirmation token missing — restoring user data and included instance-wide settings requires confirm: 'RESTORE'",
|
||||
422,
|
||||
);
|
||||
}
|
||||
@@ -403,13 +403,11 @@ const handler = apiHandler(
|
||||
unit: measurement.unit,
|
||||
source: measurement.source ?? "MANUAL",
|
||||
measuredAt: new Date(measurement.measuredAt),
|
||||
notes: measurement.notes ?? null,
|
||||
notes: null,
|
||||
notesEncrypted:
|
||||
measurement.notesEncrypted !== undefined
|
||||
? measurement.notesEncrypted === null
|
||||
? null
|
||||
: decodeEncryptedBytes(measurement.notesEncrypted)
|
||||
: encryptNote(measurement.notes ?? null),
|
||||
measurement.notesEncrypted == null
|
||||
? encryptNote(measurement.notes ?? null)
|
||||
: decodeEncryptedBytes(measurement.notesEncrypted),
|
||||
externalId: measurement.externalId ?? null,
|
||||
externalSourceVersion: measurement.externalSourceVersion ?? null,
|
||||
glucoseContext: (measurement.glucoseContext ?? null) as never,
|
||||
|
||||
Reference in new issue
Block a user