archive: return the id in archive route

This commit is contained in:
Girish Ramakrishnan
2024-12-17 14:33:36 +01:00
parent 73ffe9ce41
commit 449dd4730f
2 changed files with 3 additions and 3 deletions

View File

@@ -2591,9 +2591,9 @@ async function archive(app, backupId, auditSource) {
if (result[0].id !== backupId) throw new BoxError(BoxError.BAD_STATE, 'Latest backup id has changed');
const icons = await getIcons(app.id);
await archives.add(backupId, { icon: icons.icon, appStoreIcon: icons.appStoreIcon, appConfig: app }, auditSource);
const archiveId = await archives.add(backupId, { icon: icons.icon, appStoreIcon: icons.appStoreIcon, appConfig: app }, auditSource);
const { taskId } = await uninstall(app, auditSource);
return { taskId };
return { taskId, id: archiveId };
}
async function start(app, auditSource) {