Skip to content

Commit f439aaa

Browse files
committed
#54 got rid of some remaining hardcoded stuff on dvbe23 regarding overflows (it's useless now that we're taking overflow flag into consideration while crawling)
1 parent 1ea4023 commit f439aaa

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

cloud/functions/src/functions/firestore/services/talk-utils.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -37,34 +37,10 @@ class ConfOrganizerAllRatingsModel {
3737
}
3838

3939
export async function getEveryRatingsForEvent(eventId: string, organizerSpaceToken: string) {
40-
// FIXME: move this to conference descriptor at some point
41-
const devoxxOverflowTalkIds: Record<string, string[]> = eventId === 'dvbe23' ? {
42-
"67956": ["72002", "72003", "72004"],
43-
"67953": ["72007", "72006", "72005"],
44-
"70101": ["72009", "72008", "72010"],
45-
}: {}
46-
47-
const talkIdByOverflowTalkId = Object.entries(devoxxOverflowTalkIds).reduce((talkIdByOverflowTalkId, [talkId, overflowTalkIds]) => {
48-
overflowTalkIds.forEach(overflowTalkId => talkIdByOverflowTalkId[overflowTalkId] = talkId);
49-
return talkIdByOverflowTalkId;
50-
}, {} as Record<string, string>)
51-
5240
const dailyRatingsColl = await db.collection(`/events/${eventId}/organizer-space/${organizerSpaceToken}/daily-ratings`).listDocuments()
5341

5442
const allDailyRatings: PerTalkPublicUserIdFeedbackRating[][] = await Promise.all(dailyRatingsColl.map(async dailyRatingsDoc => {
5543
const dailyPerTalkIdRatings = (await dailyRatingsDoc.get()).data() as DailyTalkFeedbackRatings;
56-
57-
Object.entries(talkIdByOverflowTalkId).forEach(([overflowTalkId, aliasedTalkId]) => {
58-
if(dailyPerTalkIdRatings[overflowTalkId]) {
59-
// Merging overflow talk id ratings into aliased talk id ratings
60-
dailyPerTalkIdRatings[aliasedTalkId] = {
61-
...(dailyPerTalkIdRatings[aliasedTalkId] || {}),
62-
...dailyPerTalkIdRatings[overflowTalkId]
63-
}
64-
delete dailyPerTalkIdRatings[overflowTalkId];
65-
}
66-
})
67-
6844
const talkIds = Object.keys(dailyPerTalkIdRatings)
6945
return talkIds.map(talkId => {
7046
return {

0 commit comments

Comments
 (0)