Merge pull request #7735 from overleaf/jpa-fix-hard-deletion

[web] fix result handling from project-archiver hard deletion

GitOrigin-RevId: c6d7746e5e45b05d6372e5efcc029e0b566ace2d
This commit is contained in:
Timothée Alby
2022-04-26 08:04:25 +00:00
committed by Copybot
parent b289afe23c
commit 62075a6ba9
2 changed files with 5 additions and 4 deletions
@@ -74,10 +74,10 @@ async function hardDeleteProjectArchiverData(projectId) {
console.log(`Destroying hard deleted project archive for ${projectId}`)
if (DRY_RUN) return
const res = await TpdsUpdateSender.promises.deleteProject({
const ok = await TpdsUpdateSender.promises.deleteProject({
project_id: projectId,
})
if (!res) {
if (!ok) {
throw new Error(`deletion failed for ${projectId}, check logs`)
}
}