示例#1
0
        public async Task <IHttpActionResult> UpdateCellAsync(int playerBoardId, [FromBody] UpdateCellRequest request)
        {
            try
            {
                var cell = await processService.UpdateCellAsync(playerBoardId, request);

                return(Ok(cell));
            }
            catch (CannotUpdateCellException ex)
            {
                logger.Error(ex, ex.Message);
                return(BadRequest(ex.Message));
            }
        }
        /// <inheritdoc/>
        public Task <Cell> UpdateCellAsync(int playerBoardId, UpdateCellRequest request)
        {
            ValidateUpdateCellRequest(playerBoardId, request);

            return(validatedService.UpdateCellAsync(playerBoardId, request));
        }