tgz: add fileCount to integrity
This commit is contained in:
+2
-2
@@ -71,8 +71,8 @@ async function add(data) {
|
||||
const prefixId = data.type === exports.BACKUP_TYPE_APP ? `${data.type}_${data.identifier}` : data.type; // type and identifier are same for other types
|
||||
const id = `${prefixId}_v${data.packageVersion}_${hat(32)}`; // id is used by the UI to derive dependent packages. making this a UUID will require a lot of db querying
|
||||
const appConfigJson = data.appConfig ? JSON.stringify(data.appConfig) : null;
|
||||
const statsJson = data.statsJson ? JSON.stringify(data.statsJson) : null;
|
||||
const integrityJson = data.integrityJson ? JSON.stringify(data.integrityJson) : null;
|
||||
const statsJson = data.stats ? JSON.stringify(data.stats) : null;
|
||||
const integrityJson = data.integrity ? JSON.stringify(data.integrity) : null;
|
||||
|
||||
const [error] = await safe(database.query('INSERT INTO backups (id, remotePath, identifier, encryptionVersion, packageVersion, type, creationTime, state, dependsOnJson, manifestJson, preserveSecs, appConfigJson, targetId, statsJson, integrityJson) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)',
|
||||
[ id, data.remotePath, data.identifier, data.encryptionVersion, data.packageVersion, data.type, creationTime, data.state, JSON.stringify(data.dependsOn), manifestJson, data.preserveSecs, appConfigJson, data.targetId, statsJson, integrityJson ]));
|
||||
|
||||
Reference in New Issue
Block a user