Skip to content

Commit 4869c34

Browse files
committed
allowing to override openplanner's tracks/formats in crawler's descriptor
1 parent 1c7854f commit 4869c34

File tree

1 file changed

+4
-2
lines changed
  • cloud/functions/src/crawlers/openplanner

1 file changed

+4
-2
lines changed

cloud/functions/src/crawlers/openplanner/crawler.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ export const OPENPLANNER_DESCRIPTOR_PARSER = EVENT_DESCRIPTOR_PARSER.omit({
8181
logoUrl: z.string().optional(),
8282
theming: EVENT_THEME_PARSER.optional(),
8383
features: EVENT_FEATURES_CONFIG_PARSER.omit({ ratings: true }).optional(),
84+
talkFormats: z.array(THEMABLE_TALK_FORMAT_PARSER).default([]),
85+
talkTracks: z.array(THEMABLE_TALK_TRACK_PARSER).default([]),
8486
language: z.string(),
8587
ratings: RATINGS_CONFIG_PARSER,
8688
additionalBreakTimeslots: z.array(BREAK_TIME_SLOT_PARSER.omit({ type: true, id: true })).optional().default([]),
@@ -120,8 +122,8 @@ export const OPENPLANNER_CRAWLER: CrawlerKind<typeof OPENPLANNER_DESCRIPTOR_PARS
120122
.then(data => OPENPLANNER_GENERATED_SCHEDULE_PARSER.parse(data));
121123

122124
const talks: DetailedTalk[] = [],
123-
tracks: ThemedTrack[] = openPlannerSchedule.talkTracks.concat(descriptor.additionalTalkTracks),
124-
formats: ThemedTalkFormat[] = openPlannerSchedule.talkFormats.concat(descriptor.additionalTalkFormats),
125+
tracks: ThemedTrack[] = descriptor.talkTracks.concat(openPlannerSchedule.talkTracks).concat(descriptor.additionalTalkTracks),
126+
formats: ThemedTalkFormat[] = descriptor.talkFormats.concat(openPlannerSchedule.talkFormats).concat(descriptor.additionalTalkFormats),
125127
rooms: Room[] = openPlannerSchedule.rooms.concat(descriptor.additionalRooms),
126128
timezone = openPlannerSchedule.timezone;
127129

0 commit comments

Comments
 (0)