Пример #1
0
        public ActionResult <List <ThreadData> > GetAllAsync()
        {
            var userId = this.User.Claims.FirstOrDefault().Value;

            try
            {
                var threads = threadService.GetAll(userId);
                return(threads.Select(mapper.Map <ThreadData>).ToList());
            }
            catch (Exception e)
            {
                return(BadRequest(new { error = e.Message }));
            }
        }