package utils import ( "github.com/gin-gonic/gin" ) func GetUId(c *gin.Context) int { mustGet := c.MustGet("user") users := mustGet.(map[string]interface{}) id := int(users["ID"].(float64)) return id }