fix types in array helper

This commit is contained in:
Thomas Ruoff
2025-04-01 22:10:28 +02:00
parent d461e83165
commit cebbebf5df
2 changed files with 2 additions and 4 deletions

View File

@@ -12,9 +12,7 @@ mongoose.connect(MONGO_URI, {
serverSelectionTimeoutMS: 3000, serverSelectionTimeoutMS: 3000,
}) })
export async function getBookedDays( export async function getBookedDays(uuidsToIngore?: string[]) {
uuidsToIngore?: string[]
): Promise<string[]> {
const [bookedInDatabase, bookedInCalendar] = await Promise.all([ const [bookedInDatabase, bookedInCalendar] = await Promise.all([
BookingModel.findBookedDays(uuidsToIngore), BookingModel.findBookedDays(uuidsToIngore),
calendarGetBookedDays(), calendarGetBookedDays(),

View File

@@ -17,6 +17,6 @@ export function getNextBigger<T>(array: T[], pivot: T): T {
return array.sort().find((day) => day > pivot) return array.sort().find((day) => day > pivot)
} }
export function uniqueFilter(value, index, self) { export function uniqueFilter<T>(value: T, index: number, self: T[]) {
return self.indexOf(value) === index return self.indexOf(value) === index
} }