Skip to content
This repository has been archived by the owner on Oct 26, 2024. It is now read-only.

Commit

Permalink
feat(sponsor): add sponsors in formated file
Browse files Browse the repository at this point in the history
  • Loading branch information
MaloPolese committed Nov 22, 2023
1 parent a926c3b commit 7e23a7f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/openplanner/getSpeakersSessionsSchedule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const getSpeakersSessionsSchedule = async (payload: {
sessions: Session[],
team: TeamMember[]
}): Promise<{}> => {
const {event, speakers, sessions, team} = payload
const {event, speakers, sessions, team, sponsors} = payload

const tracks: Track[] = event.tracks.map((t: Track, index: number) => ({
...t,
Expand Down Expand Up @@ -269,7 +269,7 @@ export const getSpeakersSessionsSchedule = async (payload: {
delete schedule["1"]

// 5. Add team members
console.log('Adding team, ' + team.length + ' members')
console.log('Find team, ' + team.length + ' members')
const teamMembers = team.map((member: TeamMember) => {
return {
id: member.id,
Expand All @@ -279,14 +279,16 @@ export const getSpeakersSessionsSchedule = async (payload: {
socials: mapPersonSocials(member)
}
})
console.log('Find sponsors, ' + sponsors.length + ' sponsors')

console.log("Formatting output data done!")

const fileContent = {
speakers: outputSpeakers,
sessions: outputSessions,
schedule: schedule,
team: teamMembers
team: teamMembers,
sponsors
}

await fs.writeFile(outputFile, JSON.stringify(fileContent, null, 4))
Expand Down

0 comments on commit 7e23a7f

Please sign in to comment.