diff --git a/internal/player/service.go b/internal/player/service.go index 735f4a4..15a4099 100644 --- a/internal/player/service.go +++ b/internal/player/service.go @@ -167,9 +167,9 @@ func (s *Service) SaveGameDataByUsername(username string, data *GameDataRequest) // GrantExperience adds experience to a player and handles level ups + stat recalculation. func (s *Service) GrantExperience(userID uint, exp int) (*LevelUpResult, error) { - profile, err := s.repo.FindByUserID(userID) + profile, err := s.GetProfile(userID) if err != nil { - return nil, fmt.Errorf("프로필이 존재하지 않습니다") + return nil, fmt.Errorf("프로필 조회/생성 실패: %w", err) } result := ApplyExperience(profile.Level, profile.Experience, exp)