package utils

import (
	"bssapp-backend/auth"
	"bssapp-backend/models"
)

func UserFromClaims(c *auth.Claims) *models.User {
	if c == nil {
		return nil
	}

	return &models.User{
		ID:       int(c.ID),
		Username: c.Username,
	}
}
