mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
set name of calendar
This commit is contained in:
committed by
Thomas Ruoff
parent
5e2f83bc0f
commit
52917f7bbd
@@ -13,6 +13,7 @@ function convertDay(value: string): [number, number, number] {
|
||||
|
||||
export function generateBookedCalendar(bookings: BookingDocument[]) {
|
||||
const events = bookings.map((booking) => ({
|
||||
calName: 'Pfadi-Bussle Buchungen',
|
||||
start: convertDay(booking.days[0]),
|
||||
end: convertDay(booking.days[booking.days.length - 1]),
|
||||
title: `Buchung ${booking.booker.name}`,
|
||||
|
||||
@@ -16,7 +16,7 @@ export default async function useHandler(
|
||||
res.setHeader('Content-Type', 'text/calendar;charset=utf-8')
|
||||
res.setHeader(
|
||||
'Content-Disposition',
|
||||
'attachment; filename="pfadi-bussle.ics"'
|
||||
'attachment; filename="pfadi-bussle-buchungen.ics"'
|
||||
)
|
||||
res.send(ical)
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user