Skip to content

Commit

Permalink
Calendar only next 30 days
Browse files Browse the repository at this point in the history
  • Loading branch information
TyHil committed Jan 31, 2024
1 parent 38d8d2a commit e803be0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pages/api/getCalendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ export default function handler(req: NextApiRequest, res: NextApiResponse<Data>)
url.searchParams.append('orderBy', 'startTime');
url.searchParams.append('maxResults', '100');
url.searchParams.append('timeMin', new Date().toISOString());
const date = new Date();
date.setDate(date.getDate() + 30);
url.searchParams.append('timeMax', date.toISOString());
client
.request({
url: url.href,
Expand Down

0 comments on commit e803be0

Please sign in to comment.