using BGC.Common.Catalog; using BGC.Common.Catalog.Models; using Microsoft.AspNetCore.Mvc; namespace BGC.WebApi.Controllers { [Route("[controller]/[action]")] [ApiController] public class CatalogController : ControllerBase { private readonly ICatalogRepository _catalogRepository; public CatalogController(ICatalogRepository catalogRepository) { _catalogRepository = catalogRepository; } [HttpGet] public async Task GetDataForSelection() { return await _catalogRepository.GetDataForSelection(); } [HttpGet] public async Task GetGameFull([FromQuery] long gameId) { return await _catalogRepository.GetGameFull(gameId); } [HttpPost] public async Task UpsertGame([FromBody] GameUpsertingRequest game) { return await _catalogRepository.UpsertGame(game); } [HttpPost] public async Task GetGamesByFilter([FromBody] GamesFilter game) { return await _catalogRepository.GetGamesByFilter(game); } } }