コード例 #1
0
        public async Task <IActionResult> AddHuntingSpotToCharacterAsync(int id, [FromQuery] int huntingSpotId)
        {
            var character = await _repository.AddHuntingSpotToCharacterAsync(id, huntingSpotId);

            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (character == null)
            {
                return(NotFound());
            }

            return(Ok());
        }