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
@@ -73,3 +73,10 @@ func SendInstanceReady(to, instanceName, loginURL string, expires time.Time) err
expires.Format("2 January 2006"))
return send(to, instanceName+" is ready", body)
}
// SendRenewed confirms a renewal and states the new date.
func SendRenewed(to, instanceName string, expires time.Time) error {
return send(to, instanceName+" renewed",
fmt.Sprintf("%s is renewed.\n\nYour Free licence now runs until %s.\n",
instanceName, expires.Format("2 January 2006")))
}