增加admin相关页面

This commit is contained in:
张超
2025-06-09 17:59:19 +08:00
parent c273584189
commit 7913a2b381
19 changed files with 345 additions and 532 deletions

View File

@@ -7,7 +7,6 @@ import (
"strings"
"time"
"go_blog/config"
"go_blog/models"
"github.com/gin-gonic/gin"
@@ -15,7 +14,8 @@ import (
)
// 定义 JWT 密钥(从配置文件读取)
var jwtSecret = []byte(config.GetJWTSecret())
// var jwtSecret = []byte(config.GetJWTSecret())
var jwtSecret = []byte("your-hardcoded-secret-key")
// CustomClaims 自定义 JWT 载荷(包含用户 ID
type CustomClaims struct {