From 8ab2a16c1014a3fe0b750cf43312d07697b03929 Mon Sep 17 00:00:00 2001 From: tdurieux Date: Wed, 21 Apr 2021 22:25:44 +0200 Subject: [PATCH] fix repo expiration --- routes/file.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/routes/file.js b/routes/file.js index 0b7c293..1c81a01 100644 --- a/routes/file.js +++ b/routes/file.js @@ -17,6 +17,9 @@ async function anonymizeRepository(options) { if (repoConfig == null) { throw "repo_not_found"; } + if (repoConfig.status == "removed" || repoConfig.status == "expired") { + return; + } if (repoConfig.options.expirationMode != "never") { if (repoConfig.options.expirationDate <= new Date()) { @@ -24,7 +27,6 @@ async function anonymizeRepository(options) { await repoUtils.updateStatus(repoConfig, "expired"); await repoUtils.removeRepository(repoConfig); throw "repository_expired"; - return; } }