public async Task <IActionResult> GetIdType([FromRoute] IdentifierType type, [FromQuery] long?tenantBpId) { IActionResult result; _logger.LogInformation($"GetIdType({nameof(type)}: {type.ToJson()})"); try { // set the bpId based on whether the tenant's bpId has been provided by landlord result = base.Ok(new GetBpIdTypeResponse { Identifiers = await _moveInLogic.GetIdType(tenantBpId ?? GetBpIdFromClaims(), type) }); } catch (Exception ex) { _logger.LogError(ex, "Unable to Get All ID types and values for BP", ex.Message); result = ex.ToActionResult(); } return(result); }
public async Task <IActionResult> GetIdType([FromRoute] IdentifierType type) { IActionResult result; _logger.LogInformation($"GetIdType({nameof(type)}: {type.ToJson()})"); try { // Get BP from user's authorization claims var bpId = GetBpIdFromClaims(); result = Ok(new GetBpIdTypeResponse { Identifiers = await _moveInLogic.GetIdType(bpId, type) }); } catch (Exception ex) { _logger.LogError(ex, "Unable to Get All ID types and values for BP", ex.Message); result = ex.ToActionResult(); } return(result); }