feat: localize license states and restore revoked licenses
Some checks failed
Check / delivery-static (push) Has been cancelled
Check / api (push) Has been cancelled
Check / web (push) Has been cancelled

Co-Authored-By: Craft Agent <agents-noreply@craft.do>
This commit is contained in:
2026-10-12 16:11:09 +08:00
parent f4b99e50cd
commit 09910db251
8 changed files with 141 additions and 6 deletions

View File

@@ -101,6 +101,7 @@ func registerBusinessRoutes(r *gin.Engine, a *BusinessAPI) {
secured.POST("/instances/:instance_id/freeze", a.freezeInstance)
secured.POST("/licenses", a.issueLicense)
secured.POST("/licenses/:id/revoke", func(c *gin.Context) { a.operateLicense(c, "revoke") })
secured.POST("/licenses/:id/restore", func(c *gin.Context) { a.operateLicense(c, "restore") })
secured.POST("/licenses/:id/renew", func(c *gin.Context) { a.operateLicense(c, "renew") })
}