mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 23:17:12 +01:00
update mongoose to 5.8.3 (lots of types changes)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { createEvents, createEvent, EventStatus } from 'ics'
|
||||
import { Booking } from '../db/booking'
|
||||
import { IBooking } from '../db/booking'
|
||||
import { BOOKING_STATUS } from '../db/enums'
|
||||
import { getBaseURL } from './url'
|
||||
import { daysFormatFrontend } from './date'
|
||||
@@ -12,7 +12,7 @@ function convertDay(value: string): [number, number, number] {
|
||||
return [Number(parts[0]), Number(parts[1]), Number(parts[2])]
|
||||
}
|
||||
|
||||
export function generateCalendarEntry(booking: Booking): string {
|
||||
export function generateCalendarEntry(booking: IBooking): string {
|
||||
const { error, value } = createEvent({
|
||||
productId: 'app.vercel.pfadi-bussle/ics',
|
||||
title: `Pfadi-Bussle Buchung`,
|
||||
@@ -38,7 +38,7 @@ Buchungs-Link: ${getBaseURL()}/bookings/${booking.uuid}
|
||||
return value
|
||||
}
|
||||
|
||||
export function generateBookedCalendar(bookings: Booking[]): string {
|
||||
export function generateBookedCalendar(bookings: IBooking[]): string {
|
||||
const events = bookings.map(
|
||||
(
|
||||
booking
|
||||
@@ -80,4 +80,4 @@ Link: ${getBaseURL()}/admin/bookings/${booking.uuid}
|
||||
}
|
||||
|
||||
return value
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user