feat: role.

This commit is contained in:
2026-04-28 18:58:24 +08:00
parent 9a95130488
commit aa90b10f06
5 changed files with 155 additions and 20 deletions
+3
View File
@@ -36,6 +36,9 @@ func JWTAuth() gin.HandlerFunc {
// 将用户信息存入上下文
c.Set("userID", claims.UserID)
c.Set("username", claims.Username)
c.Set("role", claims.Role)
c.Set("flavorType", claims.FlavorType)
c.Set("regionIDs", claims.RegionIDs)
c.Next()
}