Skip to content

Commit

Permalink
chore: supprime code commenté lors des tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ocruze committed Nov 27, 2023
1 parent ff4a50d commit 7351cb4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Controller/Api/WmsVectorController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
'/api/datastores/{datastoreId}/stored_data/{storedDataId}/wmsvector',
name: 'cartesgouvfr_api_wmsvector_',
options: ['expose' => true],
condition: 'request.isXmlHttpRequest()' // TODO : à remettre après les tests
condition: 'request.isXmlHttpRequest()'
)]
class WmsVectorController extends AbstractController implements ApiControllerInterface
{
Expand Down
1 change: 0 additions & 1 deletion src/Listener/InternalApiSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ public function onKernelController(ControllerEvent $event): void
/** @var AccessToken */
$accessToken = $session->get(KeycloakToken::SESSION_KEY);

// TODO préciser que c'est l'API interne
if (null == $accessToken
|| (null != $accessToken && $accessToken->hasExpired())) {
throw new CartesApiException('Unauthorized', Response::HTTP_UNAUTHORIZED, ['controller' => ApiControllerInterface::class]);
Expand Down
4 changes: 1 addition & 3 deletions src/Services/EntrepotApi/AnnexeApiService.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ class AnnexeApiService extends AbstractEntrepotApiService
{
/**
* @param array<string> $labels
* @return array
*/
public function getAll(string $datastoreId, string $mimeType = null, string $path = null, array $labels = null): array
{
{
$query = [];
if ($mimeType) {
$query['mime_type'] = $mimeType;
Expand All @@ -26,7 +25,6 @@ public function getAll(string $datastoreId, string $mimeType = null, string $pat

public function get(string $datastoreId, string $annexeId): array
{
// TODO : mettre à jour l'url annexe
$annexesUrl = $this->parameters->get('annexes_url');
$response = $this->request('GET', "datastores/$datastoreId/annexes/$annexeId");
$response['paths'][0] = $annexesUrl.$response['paths'][0];
Expand Down

0 comments on commit 7351cb4

Please sign in to comment.