示例#1
0
        public async Task <IActionResult> GetTalkByTilte(string title)
        {
            var talkDTo = await _talkService.GetTalkByTitleAsync(title);

            try
            {
                if (talkDTo == null)
                {
                    return(NotFound(new ApiResponse {
                        Status = false, Message = "Not Found"
                    }));
                }
            }
            catch (Exception ex)
            {
                _logger.LogError(ex.Message, $"Failed to pull request for Talks per Title ==> {title}: {DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss.fff")}");
            }
            _logger.LogInformation("Successfully pulled request for Talks per Title");
            return(Ok(new ApiResponse {
                Status = true, Message = "Successful", Result = talkDTo
            }));
        }