feat(admin): renew a Free instance from the portal

Available from seven days before expiry and, deliberately, at any point
after it up to deletion, so the same button rescues a lapsed instance.

Renewal is manual because it is the entire reclaim signal: an instance
nobody renews is one nobody is using, which is what makes reaping safe.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
mrhid6
2026-07-26 13:17:45 +01:00
co-authored by Claude Opus 5
parent 1836237f82
commit 909ddb884e
4 changed files with 81 additions and 0 deletions
+7
View File
@@ -53,6 +53,13 @@ const MaxRelinksPerTerm = 3
// paying customer's instance goes read-only.
const GracePeriod = 3 * 24 * time.Hour
// RenewWindow is how long before expiry a Free instance may be renewed.
//
// Renewal stays available after expiry too, right up until the reaper takes the
// instance, so the same button rescues a lapsed instance instead of needing a
// second mechanism.
const RenewWindow = 7 * 24 * time.Hour
type Account struct {
ID bson.ObjectID `bson:"_id,omitempty" json:"-"`
AccountID string `bson:"account_id" json:"account_id"`