public async Task <ActionResult <ProductAttribute> > Get([Required] Guid id, CancellationToken ct = default) { var attribute = await _productAttributesService.GetAsync(id, false, ct); if (attribute == null) { return(NotFound(id)); } return(ReturnIfAllowed(attribute, Roles.Products, attribute.AccountId)); }
public async Task <ActionResult <ProductAttributeChangeGetPagedListResponse> > GetPagedList( ProductAttributeChangeGetPagedListRequest request, CancellationToken ct = default) { var attribute = await _productAttributesService.GetAsync(request.AttributeId, false, ct); var response = await _productAttributeChangesService.GetPagedListAsync(request, ct); return(ReturnIfAllowed(response, Roles.Products, attribute.AccountId)); }