archive: add appConfig, icon and appStoreIcon
This commit is contained in:
+3
-1
@@ -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 };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user