コード例 #1
0
        public async Task <IActionResult> CreateFeedback(
            [FromQuery] PagingOptions pagingOptions,
            [FromQuery] SortOptions <Question, QuestionEntity> sortOptions,
            [FromQuery] SearchOptions <Question, QuestionEntity> searchOptions,
            [FromBody] FeedbackForm feedback)
        {
            pagingOptions.Offset = pagingOptions.Offset ?? _defaultPagingOptions.Offset;
            pagingOptions.Limit  = pagingOptions.Limit ?? _defaultPagingOptions.Limit;

            //var userId = await _user.GetUserIdAsync(User);
            //if (userId == null) return NotFound();

            await _feedback.AddAsync(pagingOptions, sortOptions, searchOptions, feedback);

            return(Ok());
        }