archive: add appConfig, icon and appStoreIcon

This commit is contained in:
Girish Ramakrishnan
2024-12-09 23:20:44 +01:00
parent cec2106cfe
commit 2ad93c114e
8 changed files with 63 additions and 9 deletions
+3 -1
View File
@@ -2494,8 +2494,10 @@ async function archive(app, backupId, auditSource) {
if (result.length === 0) throw new BoxError(BoxError.BAD_STATE, 'No recent backup to archive');
if (result[0].id !== backupId) throw new BoxError(BoxError.BAD_STATE, 'Latest backup id has changed');
const icons = await getIcons(app.id);
const { taskId } = await uninstall(app, auditSource);
await backups.update(result[0].id, { archive: true });
await backups.update(result[0].id, { archive: true, icon: icons.icon, appStoreIcon: icons.appStoreIcon });
if (!result[0].appConfig) await backups.update(result[0].id, { appConfig: app }); // workaround for previous versions not setting appConfig
return { taskId };
}