package com.alterdekim.game.service;

import com.alterdekim.game.entity.MiniGame;
import com.alterdekim.game.repository.MiniGameRepository;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Optional;

@Service
public class MiniGameService {
    @Autowired
    private MiniGameRepository repository;

    public void save(MiniGame game) {
        this.repository.save(game);
    }

    public Optional<MiniGame> findGameById(Long id) {
        return this.repository.findById(id);
    }
}
