diff --git a/Controllers/HomeController.cs b/Controllers/HomeController.cs index 96c327f..8139038 100644 --- a/Controllers/HomeController.cs +++ b/Controllers/HomeController.cs @@ -42,6 +42,19 @@ public class HomeController : Controller return View(); } + public IActionResult GetMatch(Guid id) + { + var match = dbContext.Matches + .Include(m => m.Deck) + .Include(m => m.PlayerOne) + .ThenInclude(p => p.HandCards) + .Include(m => m.PlayerTwo) + .ThenInclude(p => p.HandCards) + .FirstOrDefault(m => m.Id == id); + + return Ok(match); + } + public async Task CreateMatch(Guid userOneGuid, Guid userTwoGuid) { var playerOne = new Player