コード例 #1
0
        public async Task <IActionResult> GetJourneys(string userId, ResourceParameters resourceParameters)
        {
            if (!_userService.UserExists(userId))
            {
                return(NotFound());
            }

            var pagedJourneys = _journeyService.GetPagedJourneys(userId, resourceParameters);

            AddPaginationHeader(pagedJourneys, Constants.RouteNames.GetJourneys, resourceParameters);

            await AddLinksToCollectionAsync(pagedJourneys);

            return(Ok(pagedJourneys));
        }