Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: mab <[email protected]>
  • Loading branch information
dtrucs and mabhub committed Oct 18, 2024
1 parent 227c41e commit 4ce5023
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions frontend/src/modules/touristicEvent/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,20 @@ import { APIQuery, APIResponseForList } from 'services/api/interface';
import { RawTouristicEvent, RawTouristicEventDetails } from './interface';

const fieldsParams = {
fields:
'id,attachments,name,geometry,themes,cities,type,begin_date,end_date,approved,start_time,end_time',
fields: [
'id',
'attachments',
'name',
'geometry',
'themes',
'cities',
'type',
'begin_date',
'end_date',
'approved',
'start_time',
'end_time',
].join(','),
};

export const fetchTouristicEvents = (
Expand All @@ -22,7 +34,25 @@ export const fetchTouristicEvents = (
};

const fieldsParamsDetails = {
fields: `${fieldsParams.fields},description,description_teaser,participant_number,pdf,meeting_point,duration,source,contact,email,website,accessibility,organizer,speaker,target_audience,practical_info,booking`,
fields: [
fieldsParams.fields,
'description',
'description_teaser',
'participant_number',
'pdf',
'meeting_point',
'duration',
'source',
'contact',
'email',
'website',
'accessibility',
'organizer',
'speaker',
'target_audience',
'practical_info',
'booking',
].join(','),
format: 'geojson',
};

Expand Down

0 comments on commit 4ce5023

Please sign in to comment.