Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

Commit

Permalink
Add more debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
TheEgghead27 committed Feb 24, 2024
1 parent 3ffd429 commit d2daaf1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/googleApis/gmailWatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const parser = require('mailparser').simpleParser;
const GmailApi = new google.gmail({ version: 'v1', auth: oAuth2Client });

const getUnreadEmails = async () => {
await getOAuthId();

const response = await GmailApi.users.messages.list({
userId: 'me',
labelIds: ['UNREAD']
Expand Down
1 change: 1 addition & 0 deletions src/googleApis/oAuth2Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export const getOAuthId = async () => {

// This function will just call the calendar api once per minute in order to keep our access token fresh
const fakeApiCall = async () => {
console.log("Setting up OAuth!");
await setupOauth;

const calendar = google.calendar({ version: 'v3', auth: oAuth2Client });
Expand Down

0 comments on commit d2daaf1

Please sign in to comment.