mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 16:22:44 +00:00
Prefix loading successfully from config/local.json for both Homebrewery and Google brews.
Concats switched to string literals to make Linter happy.
This commit is contained in:
@@ -258,7 +258,12 @@ GoogleActions = {
|
||||
}
|
||||
|
||||
//Access actual file with service account. Just api key is causing "automated query" errors.
|
||||
const keys = JSON.parse(config.get('service_account'));
|
||||
|
||||
const actionList = {
|
||||
'string' : function() { return JSON.parse(config.get('service_account')); },
|
||||
'object' : function() { return config.get('service_account'); }
|
||||
};
|
||||
const keys = actionList[typeof(config.get('service_account'))]();
|
||||
const serviceAuth = google.auth.fromJSON(keys);
|
||||
serviceAuth.scopes = ['https://www.googleapis.com/auth/drive'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user