Skip to content

Commit

Permalink
Updated gulp
Browse files Browse the repository at this point in the history
  • Loading branch information
stewartmcgown committed Sep 5, 2018
1 parent 624434b commit 4176cc1
Show file tree
Hide file tree
Showing 3 changed files with 1,904 additions and 363 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
package-lock.json
12 changes: 9 additions & 3 deletions dist/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const get = (p, o, r = null) =>

// Client ID and API key from the Developer Console
const API_KEY = 'AIzaSyBLjH1zVUY5zh3NM65NqRVP3eQxZy6ifcA';
const CLIENT_ID = '257316982603-nr1g6o1icrqoiaui4rrhu31865ph11r3.apps.googleusercontent.com';
const PRODUCTION_HOSTNAME = "twistedcore.co.uk"

// Array of API discovery doc URLs for APIs used by the quickstart
const DISCOVERY_DOCS = ["https://www.googleapis.com/discovery/v1/apis/drive/v3/rest"];
Expand All @@ -34,6 +34,12 @@ const DISCOVERY_DOCS = ["https://www.googleapis.com/discovery/v1/apis/drive/v3/r
// included, separated by spaces.
const SCOPES = 'https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.photos.readonly';

let CLIENT_ID = () => {
if (window.location.hostname == PRODUCTION_HOSTNAME)
return "257316982603-0jmairn23vl079i1tt4tf0nk5kmkn32t.apps.googleusercontent.com"
else
return "257316982603-nr1g6o1icrqoiaui4rrhu31865ph11r3.apps.googleusercontent.com"
}
class Geocoder {
constructor(photoMap, service=null) {
this.activeGeocodeCount = 0
Expand Down Expand Up @@ -1845,7 +1851,7 @@ class PhotoMap {

await gapi.client.init({
apiKey: API_KEY,
clientId: CLIENT_ID,
clientId: CLIENT_ID(),
discoveryDocs: DISCOVERY_DOCS,
scope: SCOPES
}).then(() => gapi.client.drive.files.list({
Expand Down Expand Up @@ -2095,7 +2101,7 @@ async function signInHandler(authenticated=false) {
photoMap.ui.statusMessage = "Signing in..."

gapi.auth2.authorize({
'client_id': CLIENT_ID,
'client_id': CLIENT_ID(),
'immediate': false,
'scope': SCOPES
}, () => {
Expand Down
Loading

0 comments on commit 4176cc1

Please sign in to comment.