ADD: added new auth middleware and changed the roles value ind the jwt token to a array

This commit is contained in:
hwinkel
2025-11-23 22:55:04 +01:00
parent 139a99d96e
commit 3a6c3a86e3
9 changed files with 84 additions and 30 deletions

View File

@@ -11,6 +11,7 @@ import (
)
func GetPlayers(c *gin.Context, db *sql.DB) {
// log.Println(c.)
log.Println(c.GetString("userId"), c.GetString("email"), c.GetString("role"))
// Simulate fetching players from a database