Skip to content

Commit

Permalink
Constellation /GET : return Representaiton not array
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephane MEAUDRE committed Mar 22, 2024
1 parent f769490 commit 45560c1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/src/State/ConstellationsStateProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ public function provide(Operation $operation, array $uriVariables = [], array $c
*/
['id' => $idConst] = $uriVariables;
$constellationDoc = $this->constellationRepository->findById(md5(ucfirst($idConst)));
yield $this->constellationFactory->buildDto($constellationDoc)->current();
$constellationRepresentation = fn() => yield from $this->constellationFactory->buildDto($constellationDoc);
return $constellationRepresentation()->current();

}
}
}

0 comments on commit 45560c1

Please sign in to comment.