コード例 #1
0
        public async Task <IActionResult> EditPointsForMatch([FromRoute] int matchId, [FromBody] ICollection <Points> points)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    return(BadRequest(ModelState));
                }

                await pointsService.EditPointsForMatchAsync(points);

                return(Accepted());
            }
            catch (NotFoundInDatabaseException)
            {
                return(NotFound());
            }
            catch (ArgumentException)
            {
                return(Conflict());
            }
            catch (Exception)
            {
                return(BadRequest());
            }
        }