public async Task <ActionResult <CustomerSource> > Get([Required] Guid id, CancellationToken ct = default) { var source = await _customerSourcesService.GetAsync(id, false, ct); if (source == null) { return(NotFound(id)); } return(ReturnIfAllowed(source, Roles.Customers, source.AccountId)); }
public async Task <ActionResult <CustomerSourceChangeGetPagedListResponse> > GetPagedList( CustomerSourceChangeGetPagedListRequest request, CancellationToken ct = default) { var source = await _customerSourcesService.GetAsync(request.SourceId, false, ct); var response = await _customerSourceChangesService.GetPagedListAsync(request, ct); return(ReturnIfAllowed(response, Roles.Customers, source.AccountId)); }