Skip to content
Snippets Groups Projects
Commit 2d3b3579 authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

fix: add trim for opendata request to solve 400 request issue

parent 2982dfe3
No related branches found
No related tags found
3 merge requests!27Recette,!26Dev,!18Feat/address search
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment