Completely rebuilt logic when dealing with timezones. Now all available events should appear when selecting a date.
This commit is contained in:
1 parent
96e2b762c6
commit
2b0e8bef7a
3 files changed
+145
-54
No files matched your search
@@ -33,9 +33,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||
const calendar = google.calendar({version: 'v3', auth});
|
||||
calendar.freebusy.query({
|
||||
requestBody: {
|
||||
timeMin: req.query.date + "T00:00:00.00Z",
|
||||
timeMax: req.query.date + "T23:59:59.59Z",
|
||||
timeZone: currentUser.timeZone,
|
||||
timeMin: req.query.dateFrom,
|
||||
timeMax: req.query.dateTo,
|
||||
items: [{
|
||||
"id": "primary"
|
||||
}]
|
||||
|
||||
Reference in new issue
Block a user