コード例 #1
0
        public async Task <IActionResult> GetAllIdTypes([FromQuery] long?tenantBpId)
        {
            IActionResult result;

            _logger.LogInformation("GetAllIdTypes()");

            try
            {
                // set the bpId based on whether the tenant's bpId has been provided by landlord
                var bpId = tenantBpId ?? GetBpIdFromClaims();

                result = Ok(new GetBpIdTypeResponse
                {
                    Identifiers = await _moveInLogic.GetAllIdTypes(bpId)
                });
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, "Unable to Get All ID types and values for BP");
                result = ex.ToActionResult();
            }

            return(result);
        }
コード例 #2
0
        public async Task <IActionResult> GetAllIdTypes()
        {
            IActionResult result;

            _logger.LogInformation("GetAllIdTypes()");

            try
            {
                // Get BP from user's authorization claims
                var bpId = GetBpIdFromClaims();
                result = Ok(new GetBpIdTypeResponse
                {
                    Identifiers = await _moveInLogic.GetAllIdTypes(bpId)
                });
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, "Unable to Get All ID types and values for BP");

                result = ex.ToActionResult();
            }

            return(result);
        }