Actually return the talks

This commit is contained in:
Henri Bergius 2018-12-26 12:24:09 +01:00
parent 8c1ac5f8cc
commit 8e4138b493

View file

@ -35,6 +35,9 @@ function getEvents(number) {
} }
Object.keys(day.rooms).forEach((room) => { Object.keys(day.rooms).forEach((room) => {
day.rooms[room].forEach((slot) => { day.rooms[room].forEach((slot) => {
if (!slot.date) {
return;
}
const start = new Date(slot.date); const start = new Date(slot.date);
const [durationH, durationM] = slot.duration.split(':').map(val => parseInt(val, 10)); const [durationH, durationM] = slot.duration.split(':').map(val => parseInt(val, 10));
const end = new Date(slot.date); const end = new Date(slot.date);
@ -54,6 +57,7 @@ function getEvents(number) {
}); });
}); });
}); });
return talks;
}) })
.then(talks => baseevents.concat(talks))) .then(talks => baseevents.concat(talks)))
.then(talks => fetch('https://launchlibrary.net/1.3/launch/next/2') .then(talks => fetch('https://launchlibrary.net/1.3/launch/next/2')