public function getRecommendations(Request
$request, Context
$context): JsonResponse
{ $region =
$request->query->
has('region'
) ?
(string) $request->query->
get('region'
) : null;
$category =
$request->query->
has('category'
) ?
(string) $request->query->
get('category'
) : null;
/** @var PluginCollection $plugins */
$plugins =
$this->pluginRepo->
search(new Criteria(),
$context)->
getEntities();
/** @var AppCollection $apps */
$apps =
$this->appRepo->
search(new Criteria(),
$context)->
getEntities();
try { $recommendations =
$this->frwService->
getRecommendations($plugins,
$apps,
$region,
$category,
$context);
} catch (ClientException
$exception) { throw new StoreApiException($exception);
} return new JsonResponse([ 'items' =>
$recommendations,
'total' => \
count($recommendations),
]);
} #[Route(path: '/api/_action/store/frw/login', name: 'api.custom.store.frw.login', methods: ['POST'])]