{ } #[Route(path: '/api/_admin/product-stream-preview/{salesChannelId}', name: 'api.admin.product-stream-preview', defaults: ['_routeScope' => ['administration']], methods: ['POST'])]
public function productStreamPreview(string
$salesChannelId, Request
$request, Context
$context): JsonResponse
{ $salesChannelContext =
$this->salesChannelContextService->
get( new SalesChannelContextServiceParameters( $salesChannelId,
Random::
getAlphanumericString(32
),
$request->headers->
get(PlatformRequest::HEADER_LANGUAGE_ID
),
$context->
getCurrencyId() ) );
if (empty($request->request->
all('ids'
))) { $request->request->
remove('ids'
);
} $criteria =
$this->criteriaBuilder->
handleRequest( $request,
new Criteria(),
$this->productDefinition,