package users import ( "net/http" "github.com/gin-gonic/gin" ) // GetCurrentUser returns the authenticated user's information func GetCurrentUser(c *gin.Context) { // Get user from context (set by auth middleware) user, exists := c.Get("user") if !exists { c.JSON(http.StatusNotFound, gin.H{"error": "User not found"}) return } c.JSON(http.StatusOK, gin.H{"user": user}) }