Fix syntax error in gmail-agent index.js
This commit is contained in:
parent
e0328f0260
commit
d12dd5fa63
|
|
@ -28,12 +28,11 @@ function loadAuth() {
|
|||
console.warn('⚠️ Missing credentials.json. Gmail Agent will not be able to process emails or authenticate new accounts until this file is provided.');
|
||||
return;
|
||||
}
|
||||
if (!fs.existsSync(TOKENS_DIR)) {
|
||||
fs.mkdirSync(TOKENS_DIR, { recursive: true });
|
||||
console.log('Created empty tokens directory.');
|
||||
}
|
||||
|
||||
try {
|
||||
if (!fs.existsSync(TOKENS_DIR)) {
|
||||
fs.mkdirSync(TOKENS_DIR, { recursive: true });
|
||||
console.log('Created empty tokens directory.');
|
||||
}
|
||||
|
||||
const creds = getCredentials();
|
||||
const {client_secret, client_id, redirect_uris} = creds.installed || creds.web;
|
||||
baseOAuth2Client = { client_id, client_secret, redirect_uri: redirect_uris[0] || 'urn:ietf:wg:oauth:2.0:oob' };
|
||||
|
|
|
|||
Loading…
Reference in New Issue