Example #1
0
        public async Task <IActionResult> List([FromQuery] ListAccountUsersRequest request, [FromRoute] int accountId)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState.GetErrorMessages()));
            }

            var response = await _accountUserService.ListAsync(request, accountId);

            if (!response.IsValid)
            {
                return(BadRequest(response.Message));
            }
            return(Ok(response));
        }