public async Task <ActionResult <Party> > Get(int partyId) { if (!IsOrg(HttpContext)) { int? userId = GetUserId(HttpContext); bool?isValid = false; if (userId.HasValue) { isValid = await _authorization.ValidateSelectedParty(userId.Value, partyId); } if (!isValid.HasValue || !isValid.Value) { return(Unauthorized()); } } Party result = await _partiesWrapper.GetParty(partyId); if (result == null) { return(NotFound()); } return(Ok(result)); }
public async Task <ActionResult> Get(int partyID) { Party result = await _partiesWrapper.GetParty(partyID); if (result == null) { return(NotFound()); } return(Ok(result)); }