搜索
Build docker and publish / build (20.15.1) (push) Successful in 7m52s

This commit is contained in:
2026-03-08 08:05:26 -07:00
parent 4907853667
commit 69028898a4
6 changed files with 22 additions and 4 deletions
+4
View File
@@ -4,6 +4,7 @@ import (
"context"
"fmt"
"strings"
"time"
"github.com/perfect-panel/server/pkg/constant"
@@ -67,6 +68,9 @@ func AuthMiddleware(svc *svc.ServiceContext) func(c *gin.Context) {
return
}
// sliding session: refresh TTL on every active request
svc.Redis.Expire(c, sessionIdCacheKey, time.Duration(svc.Config.JwtAuth.AccessExpire)*time.Second)
userInfo, err := svc.UserModel.FindOne(c, userId)
if err != nil {
logger.WithContext(c.Request.Context()).Debug("[AuthMiddleware] UserModel FindOne", logger.Field("error", err.Error()), logger.Field("userId", userId))