mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
fix types in array helper
This commit is contained in:
@@ -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(),
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user