selected calendars hotfix
parent
2441f47c10
commit
95a99c620e
|
@ -17,7 +17,13 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let availability = await getBusyTimes(currentUser.credentials, req.query.dateFrom, req.query.dateTo);
|
const selectedCalendars = (await prisma.selectedCalendar.findMany({
|
||||||
|
where: {
|
||||||
|
userId: currentUser.id
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
|
let availability = await getBusyTimes(currentUser.credentials, req.query.dateFrom, req.query.dateTo, selectedCalendars);
|
||||||
|
|
||||||
availability = availability.map(a => ({
|
availability = availability.map(a => ({
|
||||||
start: dayjs(a.start).subtract(currentUser.bufferTime, 'minute').toString(),
|
start: dayjs(a.start).subtract(currentUser.bufferTime, 'minute').toString(),
|
||||||
|
|
Loading…
Reference in New Issue