feat: 个人中心发布

This commit is contained in:
Blizzard
2026-02-14 11:38:59 +08:00
parent f1d9f63296
commit 4820323381
35 changed files with 691 additions and 148 deletions
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"sundynix-go/global"
"sundynix-go/model/commom/response"
"sundynix-go/service"
"sundynix-go/utils"
"sundynix-go/utils/auth"
"sundynix-go/utils/timer"
"time"
"github.com/gin-gonic/gin"
@@ -48,7 +48,7 @@ func AuthMiddleware() gin.HandlerFunc {
}
c.Set("claims", claims)
if claims.ExpiresAt.Unix()-time.Now().Unix() < claims.BufferTime {
dr, _ := utils.ParseDuration(global.Config.JWT.ExpiresTime)
dr, _ := timer.ParseDuration(global.Config.JWT.ExpiresTime)
claims.ExpiresAt = jwt.NewNumericDate(time.Now().Add(dr))
}
c.Next()