From bc85b2c8addd1ee2ca5fdee479e8155517ce3fde Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Wed, 10 Jun 2026 09:30:25 +0800 Subject: [PATCH] =?UTF-8?q?fix(backend):=20license/info=20=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=20phase=20=E5=AD=97=E6=AE=B5=EF=BC=8C=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E6=A8=AA=E5=B9=85/=E5=BC=B9=E7=AA=97=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E6=AD=A4=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- backend/internal/handler/license.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/backend/internal/handler/license.go b/backend/internal/handler/license.go index 5e7e3b7..e8469e4 100644 --- a/backend/internal/handler/license.go +++ b/backend/internal/handler/license.go @@ -60,7 +60,15 @@ func (h *LicenseHandler) Info(c *gin.Context) { c.JSON(http.StatusOK, gin.H{"data": nil}) return } - c.JSON(http.StatusOK, gin.H{"data": lic}) + phase := middleware.CalcLicensePhase(lic.ExpiresAt) + c.JSON(http.StatusOK, gin.H{"data": gin.H{ + "id": lic.ID, + "type": lic.Type, + "is_active": lic.IsActive, + "max_devices": lic.MaxDevices, + "expires_at": lic.ExpiresAt, + "phase": phase, + }}) } // Deactivate POST /api/v1/license/deactivate