fix: bad response for holidays from caldav

This commit is contained in:
Cyrille Nofficial 2022-05-27 11:01:13 +02:00
parent 923672a418
commit df5c189743

View File

@ -73,11 +73,17 @@ type CalendarHandler struct{}
func (c *CalendarHandler) ServeHTTP(w http.ResponseWriter, _ *http.Request) {
now := time.Now()
calDavHolidays, err := cal.IsHolidaysFromCaldav(now)
if err != nil {
zap.S().Warnf("unable to read holliday status from caldav: %v", err)
calDavHolidays = false
}
cd := CalendarDay{
Day: now,
WorkingDay: cal.IsWorkingDay(now),
Ferie: cal.IsHoliday(now),
Holiday: cal.IsHoliday(now),
Holiday: calDavHolidays,
Weekday: cal.IsWeekDay(now),
}