0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

Tweaks to work with current Master

This commit is contained in:
Trevor Buckner
2021-03-07 00:34:47 -05:00
parent 08492b943b
commit c4db94e86f
5 changed files with 29 additions and 9 deletions

View File

@@ -63,7 +63,7 @@ const SharePage = createClass({
<Nav.item href={`/source/${this.processShareId()}`} color='teal' icon='fas fa-code'>
source
</Nav.item>
<Nav.item href={`/download/${this.processShareId()}`} color='red' icon='fa-download'>
<Nav.item href={`/download/${this.processShareId()}`} color='red' icon='fas fa-download'>
download
</Nav.item>
<RecentNavItem brew={this.props.brew} storageKey='view' />

View File

@@ -87,7 +87,7 @@ const BrewItem = createClass({
}
return <a href={`/download/${shareLink}`}>
<i className='fa fa-download' />
<i className='fas fa-download' />
</a>;
},

21
package-lock.json generated
View File

@@ -6592,6 +6592,14 @@
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"sanitize-filename": {
"version": "1.6.3",
"resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz",
"integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==",
"requires": {
"truncate-utf8-bytes": "^1.0.0"
}
},
"saslprep": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz",
@@ -7333,6 +7341,14 @@
"nopt": "~1.0.10"
}
},
"truncate-utf8-bytes": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz",
"integrity": "sha1-QFkjkJWS1W94pYGENLC3hInKXys=",
"requires": {
"utf8-byte-length": "^1.0.1"
}
},
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
@@ -7589,6 +7605,11 @@
"resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
"integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ=="
},
"utf8-byte-length": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz",
"integrity": "sha1-9F8VDExm7uloGGUFq5P8u4rWv2E="
},
"util": {
"version": "0.10.4",
"resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",

View File

@@ -1,4 +1,4 @@
/*eslint max-lines: ["warn", {"max": 250, "skipBlankLines": true, "skipComments": true}]*/
/*eslint max-lines: ["warn", {"max": 300, "skipBlankLines": true, "skipComments": true}]*/
const _ = require('lodash');
const jwt = require('jwt-simple');
const express = require('express');

View File

@@ -259,13 +259,12 @@ GoogleActions = {
throw ('Share ID does not match');
}
//Access actual file with service account. Just api key is causing "automated query" errors.
//Access file using service account. Using API key only causes "automated query" lockouts after a while.
const keys = typeof(config.get('service_account')) == 'string' ?
JSON.parse(config.get('service_account')) :
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'];