Esempio n. 1
0
        public async Task <IActionResult> GetPaginatedCommentsByUser(string username, int page)
        {
            var user = await _userService.FindByUserName(username);

            if (user == null)
            {
                return(NotFound(new ProblemDetails()
                {
                    Title = "User not found",
                    Detail = $"User with username [{username}] not found"
                }));
            }

            return(Ok(await _commentsService.FindByUsernamePaginated(username, page)));
        }