diff --git a/src/structures/structures.service.ts b/src/structures/structures.service.ts index f0359c498908979093f2c8db3708d440e962f67a..ab157eba4d6f8154e994b9aa0cbab9a5aa1a432c 100644 --- a/src/structures/structures.service.ts +++ b/src/structures/structures.service.ts @@ -130,7 +130,7 @@ export class StructuresService { */ public async searchAddress(data: { searchQuery: string }): Promise<AxiosResponse<any>> { const req = 'https://data.grandlyon.com/api/elasticsearch/_search'; - const queryString = data.searchQuery.replace(/\s/g, ' AND '); + const queryString = data.searchQuery.trim().replace(/\s/g, ' AND '); const params = { from: 0, size: 30,