예제 #1
0
        public IActionResult GetFeedbackReaderID(string readerId)
        {
            try
            {
                var Feedback = _feedbackData.GetFeedbackByReaderId(readerId);

                if (Feedback.Count > 0)
                {
                    return(Ok(Feedback));
                }

                return(NotFound());
            }
            catch (Exception ex)
            {
                _apiErrorHandler.CreateError(ex.Source, ex.StackTrace, ex.Message);
            }

            return(StatusCode(500));
        }
        public IActionResult GetFeedbackReaderID()
        {
            try
            {
                var userId   = User.FindFirst(ClaimTypes.NameIdentifier)?.Value;
                var Feedback = _feedbackData.GetFeedbackByReaderId(userId);

                if (Feedback.Count > 0)
                {
                    return(Ok(Feedback));
                }

                return(NotFound());
            }
            catch (Exception ex)
            {
                _apiErrorHandler.CreateError(ex.Source, ex.StackTrace, ex.Message);
            }

            return(StatusCode(500));
        }