Skip to content

Commit d5b3b71

Browse files
Merge pull request #106 from adobe/scheduler-fix
Scheduler fix
2 parents d360576 + 1a60320 commit d5b3b71

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

nx/blocks/snapshot-admin/utils/utils.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,11 @@ export async function deleteSnapshot(name, paths = ['/*']) {
9595
}));
9696
const firstError = results.find((result) => result.error);
9797
if (firstError) return firstError;
98-
return results[0];
98+
// once all resources are deleted, delete the snapshot as well
99+
const opts = { method: 'DELETE' };
100+
const resp = await daFetch(`${AEM_ORIGIN}/snapshot/${org}/${site}/main/${name}`, opts);
101+
if (!resp.ok) return formatError(resp);
102+
return { success: true };
99103
}
100104

101105
export function setOrgSite(suppliedOrg, suppliedSite) {

0 commit comments

Comments
 (0)