예제 #1
0
        public async Task <IActionResult> CreateGameWithFriend([FromBody] GameFullDTO game)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest() as IActionResult);
            }

            var entity = await _service.CreateNewGameWithFriend(game);

            return(entity == null?StatusCode(409) as IActionResult
                   : Ok(entity));
        }