public IActionResult SetReady([FromRoute] int roomId, [FromBody] string userName) { if (!_roundStorage.ContainRoom(roomId)) { return(NotFound()); } var gamer = new GamerStep() { UserName = userName, UserAction = GameActions.Ready }; _roundStorage.AddGamer(roomId, gamer); return(Ok()); }
public IActionResult PostRound([FromBody] GameActions action, [FromRoute] string userName, [FromRoute] int roomId) { if (roomId < 0) { return(BadRequest(roomId)); } var gamerReq = new GamerStep { UserName = userName, UserAction = action }; _roundStorage.AddGamer(roomId, gamerReq); return(Ok()); }