Skip to content
Snippets Groups Projects
Commit 0cb931b4 authored by Jérémie BRISON's avatar Jérémie BRISON
Browse files

fix(autocomplete) : encode URI

parent ac76d364
No related branches found
No related tags found
3 merge requests!46Recette,!45Dev,!43fix(autoComplete) : change api
......@@ -151,8 +151,6 @@ export class StructuresService {
* Search structure address based on data search WS
*/
public async searchAddress(data: { searchQuery: string }): Promise<AxiosResponse<any>> {
data.searchQuery = data.searchQuery.replace('à', 'a');
data.searchQuery = data.searchQuery.replace(/é|è/g, 'e');
const req =
'https://download.data.grandlyon.com/geocoding/photon-bal/api?q=' +
data.searchQuery +
......@@ -160,7 +158,7 @@ export class StructuresService {
return new Promise((resolve, reject) => {
this.httpService
.request({
url: req,
url: encodeURI(req),
method: 'GET',
headers: { 'Content-Type': 'application/json' },
})
......
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