@@ -69,26 +69,26 @@ public function index(Request $request): Response
6969 'themes ' => $ this ->themes ,
7070 ];
7171
72- $ user = $ this ->getUser ();
73- if ($ user instanceof User && $ user ->getCredentials ()) {
74- try {
75- $ response = $ this ->createGeocachingSdk ($ user )->getUserLists ('me ' , [
76- 'types ' => 'pq ' ,
77- 'take ' => 50 ,
78- 'fields ' => 'referenceCode,name ' ,
79- ]);
80- /** @var list<object{referenceCode: string, name: string}> $pocketQueryList */
81- $ pocketQueryList = json_decode ((string ) $ response ->getBody (), false , 512 , JSON_THROW_ON_ERROR );
82- usort ($ pocketQueryList , fn ($ a , $ b ) => $ a ->name <=> $ b ->name );
83- $ params ['pocketqueryList ' ] = $ pocketQueryList ;
84- } catch (\Throwable $ e ) {
85- // Pocket queries are optional — the upload form still works without them
86- $ this ->appLogger ->error ('Failed to fetch pocket query list ' , [
87- 'exception ' => $ e ,
88- 'user ' => $ user ->getUserIdentifier (),
89- ]);
90- }
91- }
72+ // $user = $this->getUser();
73+ // if ($user instanceof User && $user->getCredentials()) {
74+ // try {
75+ // $response = $this->createGeocachingSdk($user)->getUserLists('me', [
76+ // 'types' => 'pq',
77+ // 'take' => 50,
78+ // 'fields' => 'referenceCode,name',
79+ // ]);
80+ // /** @var list<object{referenceCode: string, name: string}> $pocketQueryList */
81+ // $pocketQueryList = json_decode((string) $response->getBody(), false, 512, JSON_THROW_ON_ERROR);
82+ // usort($pocketQueryList, fn ($a, $b) => $a->name <=> $b->name);
83+ // $params['pocketqueryList'] = $pocketQueryList;
84+ // } catch (\Throwable $e) {
85+ // // Pocket queries are optional — the upload form still works without them
86+ // $this->appLogger->error('Failed to fetch pocket query list', [
87+ // 'exception' => $e,
88+ // 'user' => $user->getUserIdentifier(),
89+ // ]);
90+ // }
91+ // }
9292
9393 return $ this ->render ('index.html.twig ' , $ params );
9494 }
0 commit comments