public async Task <ActionResult <SupplierCommentGetPagedListResponse> > GetPagedList(
            SupplierCommentGetPagedListRequest request,
            CancellationToken ct = default)
        {
            var supplier = await _suppliersService.GetAsync(request.SupplierId, false, ct);

            var response = await _supplierCommentsService.GetPagedListAsync(request, ct);

            return(ReturnIfAllowed(response, Roles.Suppliers, supplier.AccountId));
        }
Example #2
0
        public async Task <ActionResult <Supplier> > Get([Required] Guid id, CancellationToken ct = default)
        {
            var supplier = await _suppliersService.GetAsync(id, false, ct);

            if (supplier == null)
            {
                return(NotFound(id));
            }

            return(ReturnIfAllowed(supplier, Roles.Suppliers, supplier.AccountId));
        }