fix: preserve paid hosting deadlines, quotas and review snapshots

This commit is contained in:
Thomas Durieux committed 2026-11-02 21:03:29 +00:00
1 parent 7d7f95506a
commit 036eddfa0e
10 files changed
+116 -27

No files matched your search

+2
View File
@@ -625,6 +625,7 @@ router.post(
"githubAccess.revision": previousAccessRevision || { $exists: false } },
{
$set: {
...(repo.model.billingNeverExpiresUntil ? { billingNeverExpiresUntil: repo.model.billingNeverExpiresUntil } : {}),
settingsSavedAt: new Date(),
options: repo.model.options,
source: repo.model.source,
@@ -632,6 +633,7 @@ router.post(
conference: repo.model.conference,
anonymizeDate: repo.model.anonymizeDate,
},
...(!repo.model.billingNeverExpiresUntil ? { $unset: { billingNeverExpiresUntil: 1 } } : {}),
}
).exec();
if (!saved.matchedCount) throw appError("connection_changed", 409);