Exemple #1
0
        public async Task <IActionResult> PostCharacterToListAsync([FromQuery] string charName, int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var huntedList = await _listRepository.AddCharacterToListAsync(charName, id);

            if (huntedList == null)
            {
                return(BadRequest());
            }

            return(Ok());
        }