Exemple #1
0
        public IActionResult GetGroupIndex([FromQuery] PaginatedGroupUrlkeyModel model)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            var   user    = HttpContext.User;
            Claim idClaim = User.FindFirst("sub");
            // Get group with followers
            GroupIndexReturn ret = _groupDataService.GetGroupIndex(model.Urlkey, idClaim?.Value, model.PageIndex, model.PageSize, model.Order);

            if (ret.Group == null)
            {
                return(NotFound());
            }

            return(Ok(ret));
        }