mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-07-06 05:38:09 +02:00
fix repo expiration
This commit is contained in:
+3
-1
@@ -17,6 +17,9 @@ async function anonymizeRepository(options) {
|
|||||||
if (repoConfig == null) {
|
if (repoConfig == null) {
|
||||||
throw "repo_not_found";
|
throw "repo_not_found";
|
||||||
}
|
}
|
||||||
|
if (repoConfig.status == "removed" || repoConfig.status == "expired") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (repoConfig.options.expirationMode != "never") {
|
if (repoConfig.options.expirationMode != "never") {
|
||||||
if (repoConfig.options.expirationDate <= new Date()) {
|
if (repoConfig.options.expirationDate <= new Date()) {
|
||||||
@@ -24,7 +27,6 @@ async function anonymizeRepository(options) {
|
|||||||
await repoUtils.updateStatus(repoConfig, "expired");
|
await repoUtils.updateStatus(repoConfig, "expired");
|
||||||
await repoUtils.removeRepository(repoConfig);
|
await repoUtils.removeRepository(repoConfig);
|
||||||
throw "repository_expired";
|
throw "repository_expired";
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user