mirror of
https://github.com/nfonteyne/octane-website.git
synced 2026-09-03 23:24:48 +02:00
update: add who refused and who did not give answer yet in ics feed description
This commit is contained in:
parent
3a56ef44c3
commit
b056af78ac
3 changed files with 24 additions and 5 deletions
|
|
@ -17,12 +17,16 @@ router.get(
|
|||
const user = await usersRepo.findByIcsToken(req.params.token);
|
||||
if (!user) return res.status(404).send('Not found');
|
||||
|
||||
const [rehearsals, settings] = await Promise.all([rehearsalsRepo.findUpcoming(), calendarRepo.getSlotSettings()]);
|
||||
const [rehearsals, settings, allUsers] = await Promise.all([
|
||||
rehearsalsRepo.findUpcoming(),
|
||||
calendarRepo.getSlotSettings(),
|
||||
usersRepo.findAllNames(),
|
||||
]);
|
||||
// req.protocol honors X-Forwarded-Proto here — see app.set('trust proxy', 1) in app.js.
|
||||
const baseUrl = `${req.protocol}://${req.get('host')}`;
|
||||
res
|
||||
.type('text/calendar; charset=utf-8')
|
||||
.send(buildRehearsalsFeed(rehearsals, { threshold: settings.rehearsalConfirmThreshold, baseUrl }));
|
||||
.send(buildRehearsalsFeed(rehearsals, { threshold: settings.rehearsalConfirmThreshold, baseUrl, allUsers }));
|
||||
})
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue