package com.alterdekim.game.component;

import com.alterdekim.game.entity.User;
import com.alterdekim.game.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class ReferenceLoader {
    @Autowired
    private UserRepository userRepository;

    public User getUserReference(Integer userId) {
        return userRepository.getReferenceById(userId);
    }
}
