mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-06 05:19:43 +00:00
[WIP] Add postal code search endpoint and controller integration
Introduced a new API endpoint `/api/1.0/main/address-reference/postal-code/search` for searching postal codes matching a query string. Implemented `PostalCodeForAddressReferenceApiController` to handle requests and integrated with `PostalCodeForAddressReferenceRepository`. Enhanced repository to include `country_name` in results by decoding JSON data. Updated API specifications accordingly.
This commit is contained in:
@@ -51,7 +51,9 @@ final readonly class PostalCodeForAddressReferenceRepository implements PostalCo
|
||||
|
||||
$result = $qb->executeQuery();
|
||||
|
||||
return $result->iterateAssociative();
|
||||
foreach ($result->iterateAssociative() as $row) {
|
||||
yield [...$row, 'country_name' => json_decode($row['country_name'], true, 512, JSON_THROW_ON_ERROR)];
|
||||
}
|
||||
}
|
||||
|
||||
private function buildTermsFromSearchString(string $search): array
|
||||
|
Reference in New Issue
Block a user