Skip to content

Commit

Permalink
Merge pull request #170 from GeotrekCE/fix-requests
Browse files Browse the repository at this point in the history
fix: requests
  • Loading branch information
bastyen authored Jan 22, 2025
2 parents f702890 + 52832e5 commit 1631d8d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/services/outdoor-sites.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function getOutdoorSites(api, language, inBbox, cities, districts, struct
export function getOutdoorSite(api, language, outdoorSiteId, init) {
let outdoorSitesRequest = `${api}outdoor_site/${outdoorSiteId}/?language=${language}&published=true`;
outdoorSitesRequest += `&fields=id,name,geometry,accessibility,advice,ambiance,attachments,cities,children,description,description_teaser,districts,information_desks,labels,managers,orientation,pdf,period,parent,portal,practice,provider,ratings,sector,source,structure,themes,view_points,type,courses,web_links,wind,parents`;
return getAllPaginatedResults(outdoorSitesRequest, init);
return fetch(outdoorSitesRequest, init);
}

export function getOutdoorSiteTypes(api, language, init) {
Expand Down
12 changes: 6 additions & 6 deletions src/services/touristic-contents.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ export function getTouristicContentCategory(api, language, portals, init) {
export function getTouristicContentsList(api, language, inBbox, cities, districts, structures, themes, portals, init) {
let touristicContentsRequest = `${api}touristiccontent/?language=${language}&published=true`;

this.inBbox && (touristicContentsRequest += `&in_bbox=${inBbox}`);
this.cities && (touristicContentsRequest += `&cities=${cities}`);
this.districts && (touristicContentsRequest += `&districts=${districts}`);
this.structures && (touristicContentsRequest += `&structures=${structures}`);
this.themes && (touristicContentsRequest += `&themes=${themes}`);
this.portals && (touristicContentsRequest += `&portals=${portals}`);
inBbox && (touristicContentsRequest += `&in_bbox=${inBbox}`);
cities && (touristicContentsRequest += `&cities=${cities}`);
districts && (touristicContentsRequest += `&districts=${districts}`);
structures && (touristicContentsRequest += `&structures=${structures}`);
themes && (touristicContentsRequest += `&themes=${themes}`);
portals && (touristicContentsRequest += `&portals=${portals}`);

touristicContentsRequest += `&fields=id,name,attachments,category,geometry,cities,districts`;

Expand Down
12 changes: 6 additions & 6 deletions src/services/touristic-events.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ export function getTouristicEventType(api, language, portals, init) {
export function getTouristicEventsList(api, language, inBbox, cities, districts, structures, themes, portals, init) {
let touristicEventsRequest = `${api}touristicevent/?language=${language}&published=true`;

this.inBbox && (touristicEventsRequest += `&in_bbox=${inBbox}`);
this.cities && (touristicEventsRequest += `&cities=${cities}`);
this.districts && (touristicEventsRequest += `&districts=${districts}`);
this.structures && (touristicEventsRequest += `&structures=${structures}`);
this.themes && (touristicEventsRequest += `&themes=${themes}`);
this.portals && (touristicEventsRequest += `&portals=${portals}`);
inBbox && (touristicEventsRequest += `&in_bbox=${inBbox}`);
cities && (touristicEventsRequest += `&cities=${cities}`);
districts && (touristicEventsRequest += `&districts=${districts}`);
structures && (touristicEventsRequest += `&structures=${structures}`);
themes && (touristicEventsRequest += `&themes=${themes}`);
portals && (touristicEventsRequest += `&portals=${portals}`);

touristicEventsRequest += `&fields=id,name,attachments,category,geometry,cities,districts,type,begin_date,end_date`;

Expand Down

0 comments on commit 1631d8d

Please sign in to comment.