add a getmatch endpoint
This commit is contained in:
parent
46bf68e9ad
commit
a7688efcb9
@ -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<IActionResult> CreateMatch(Guid userOneGuid, Guid userTwoGuid)
|
||||
{
|
||||
var playerOne = new Player
|
||||
|
Loading…
x
Reference in New Issue
Block a user