remove redundant type key from exported objects

This commit is contained in:
Jakub Trávník 2025-12-02 11:47:26 +01:00
parent 13883f3053
commit 2dfa15a83a

View file

@ -55,7 +55,11 @@ function getExcludeKeys(includeIds: boolean, includeTimestamps: boolean, include
// Backup schedule state
"lastBackupAt", "lastBackupStatus", "lastBackupError", "nextBackupAt",
];
// Redundant fields that are already present inside the config object
// (e.g., type is duplicated as config.backend or config.type)
const redundantKeys = ["type"];
return [
...redundantKeys,
...(includeRuntimeState ? [] : runtimeStateKeys),
...(includeIds ? [] : idKeys),
...(includeTimestamps ? [] : timestampKeys),