mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-04 12:32:39 +00:00
message tweaks
This commit is contained in:
@@ -7,7 +7,7 @@ const config = require('./config.js');
|
|||||||
|
|
||||||
let serviceAuth;
|
let serviceAuth;
|
||||||
if(!config.get('service_account')){
|
if(!config.get('service_account')){
|
||||||
console.log('No Google Service Account in config files - Google Drive functionality will not function.');
|
console.log('No Google Service Account in config files - Google Drive integration will not be available.');
|
||||||
} else {
|
} else {
|
||||||
const keys = typeof(config.get('service_account')) == 'string' ?
|
const keys = typeof(config.get('service_account')) == 'string' ?
|
||||||
JSON.parse(config.get('service_account')) :
|
JSON.parse(config.get('service_account')) :
|
||||||
@@ -15,12 +15,10 @@ if(!config.get('service_account')){
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
serviceAuth = google.auth.fromJSON(keys);
|
serviceAuth = google.auth.fromJSON(keys);
|
||||||
serviceAuth.scopes = [
|
serviceAuth.scopes = ['https://www.googleapis.com/auth/drive'];
|
||||||
'https://www.googleapis.com/auth/drive'
|
|
||||||
];
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.warn(err);
|
console.warn(err);
|
||||||
console.log('Please make sure that a Google Service Account is set up properly in your config files.');
|
console.log('Please make sure the Google Service Account is set up properly in your config files.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user