예제 #1
0
        public async Task <IActionResult> GetFanficsAsync([Required] string id)
        {
            string          username = id;
            ApplicationUser item     = await _authenticationManager.UserManager.FindByNameAsync(username);

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

            List <FanficDTO> fanfics = (List <FanficDTO>)_fanficService.GetUserFanfics(item.Id);

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

            return(Ok(await GetFanficModelsFromListDTO(fanfics)));
        }