Remove to string, return dayjs object (#2464)

This commit is contained in:
Joe Au-Yeung 2022-04-12 08:01:50 -04:00 committed by GitHub
parent cde131a351
commit 9d86039987
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -87,8 +87,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
// busyTimes.push(...await getBusyVideoTimes(currentUser.credentials, dateFrom.format(), dateTo.format()));
const bufferedBusyTimes = busyTimes.map((a) => ({
start: dayjs(a.start).subtract(currentUser.bufferTime, "minute").toString(),
end: dayjs(a.end).add(currentUser.bufferTime, "minute").toString(),
start: dayjs(a.start).subtract(currentUser.bufferTime, "minute"),
end: dayjs(a.end).add(currentUser.bufferTime, "minute"),
}));
const schedule = eventType?.schedule