コード例 #1
0
        public async Task <IActionResult> GetUsers([FromQuery] AppUserQueryResource filterResource)
        {
            if (!_auth.IsSuperAdmin(User))
            {
                return(NoContent());
            }

            var filter = _mapper.Map <AppUserQueryResource, MdaAppUserQuery>(filterResource);

            var users = await _repo.GetAppUsers(filter);

            Response.AddPagination(users.CurrentPage, users.PageSize, users.TotalCount, users.TotalPages);

            return(Ok(users));
        }