예제 #1
0
        public async Task <IActionResult> SearchPolicies([FromBody] SearchAuthPolicies searchAuthPolicies)
        {
            if (searchAuthPolicies == null)
            {
                throw new ArgumentNullException(nameof(searchAuthPolicies));
            }

            var parameter = searchAuthPolicies.ToParameter();
            var result    = await _policyActions.Search(parameter);

            return(new OkObjectResult(result.ToResponse()));
        }
        public async Task <IActionResult> SearchPolicies([FromBody] SearchAuthPolicies searchAuthPolicies)
        {
            if (searchAuthPolicies == null)
            {
                return(BuildError(ErrorCodes.InvalidRequestCode, "no parameter in body request", HttpStatusCode.BadRequest));
            }

            var parameter = searchAuthPolicies.ToParameter();
            var result    = await _policyActions.Search(parameter);

            return(new OkObjectResult(result.ToResponse()));
        }