Example #1
0
        public async Task <IActionResult> TopicInfo(string topicName, int skipCount = 0, int pageSize = 10)
        {
            var  userIdStr = User.Claims?.FirstOrDefault(x => x.Type == "OryxUser")?.Value;
            Guid?userId;

            if (!string.IsNullOrEmpty(userIdStr))
            {
                userId = Guid.Parse(userIdStr);
            }
            else
            {
                userId = null;
            }

            var apiMsg = await ApiMessage.Wrap(async() =>
            {
                return(await postEntryBusiness.GetTopicInfo(userId, topicName, skipCount, pageSize));
            });

            return(Json(apiMsg));
        }