@@ -50,15 +50,15 @@ class GoogleDriveUtil {
50
50
callback : ( ) => {
51
51
gapi . client
52
52
. init ( {
53
- apiKey : this . apiKey ,
54
- clientId : this . clientId ,
55
- scope : this . scope ,
53
+ apiKey : this . apiKey ,
54
+ clientId : this . clientId ,
55
+ scope : this . scope ,
56
56
discoveryDocs : this . discoveryDocs ,
57
57
} )
58
58
. then (
59
59
( ) => {
60
60
if ( this . auth !== null && this . auth !== undefined ) {
61
- this . auth = gapi . auth2 . getAuthInstance ( ) ;
61
+ this . auth = gapi . auth2 . getAuthInstance ( ) ;
62
62
this . auth . isSignedIn . listen ( isLoggedIn => this . updateLoginStatus ( isLoggedIn ) ) ;
63
63
this . updateLoginStatus ( this . auth . isSignedIn . get ( ) ) ;
64
64
globalObserver . emit ( 'googledrive.initialized' , true ) ;
@@ -160,7 +160,7 @@ class GoogleDriveUtil {
160
160
161
161
gapi . client . drive . files
162
162
. get ( {
163
- alt : 'media' ,
163
+ alt : 'media' ,
164
164
fileId,
165
165
mimeType : 'text/plain' ,
166
166
} )
@@ -193,12 +193,12 @@ class GoogleDriveUtil {
193
193
} ;
194
194
195
195
this . createFilePickerView ( {
196
- title : translate ( 'Select a Binary Bot strategy' ) ,
196
+ title : translate ( 'Select a Binary Bot strategy' ) ,
197
197
afterAuthCallback : gapi . client . drive . files . list ,
198
- mimeType : [ 'text/xml' , 'application/xml' ] ,
199
- pickerCallback : userPickedFile ,
200
- generalCallback : resolve ,
201
- rejectCallback : err => {
198
+ mimeType : [ 'text/xml' , 'application/xml' ] ,
199
+ pickerCallback : userPickedFile ,
200
+ generalCallback : resolve ,
201
+ rejectCallback : err => {
202
202
if ( err . status && err . status === 401 ) this . logout ( ) ;
203
203
204
204
const error = new TrackJSError (
@@ -210,7 +210,7 @@ class GoogleDriveUtil {
210
210
reject ( error ) ;
211
211
} ,
212
212
generalRejectCallback : reject ,
213
- selectFolderEnabled : false ,
213
+ selectFolderEnabled : false ,
214
214
} ) ;
215
215
} ) ;
216
216
}
@@ -231,9 +231,9 @@ class GoogleDriveUtil {
231
231
gapi . client . drive . files
232
232
. create ( {
233
233
resource : {
234
- name : this . botFolder ,
234
+ name : this . botFolder ,
235
235
mimeType : 'application/vnd.google-apps.folder' ,
236
- fields : 'id' ,
236
+ fields : 'id' ,
237
237
} ,
238
238
} )
239
239
. then ( resolve )
@@ -264,9 +264,9 @@ class GoogleDriveUtil {
264
264
const folderId = data . docs [ 0 ] . id ;
265
265
const strategyFile = new Blob ( [ options . content ] , { type : options . mimeType } ) ;
266
266
const strategyFileMetadata = JSON . stringify ( {
267
- name : options . name ,
267
+ name : options . name ,
268
268
mimeType : options . mimeType ,
269
- parents : [ folderId ] ,
269
+ parents : [ folderId ] ,
270
270
} ) ;
271
271
272
272
const formData = new FormData ( ) ;
@@ -298,11 +298,11 @@ class GoogleDriveUtil {
298
298
} ;
299
299
300
300
this . createFilePickerView ( {
301
- title : translate ( 'Select a folder' ) ,
302
- afterAuthCallback : this . getDefaultFolderId . bind ( this ) ,
303
- mimeType : 'application/vnd.google-apps.folder' ,
304
- pickerCallback : savePickerCallback ,
305
- rejectCallback : reject ,
301
+ title : translate ( 'Select a folder' ) ,
302
+ afterAuthCallback : this . getDefaultFolderId . bind ( this ) ,
303
+ mimeType : 'application/vnd.google-apps.folder' ,
304
+ pickerCallback : savePickerCallback ,
305
+ rejectCallback : reject ,
306
306
generalRejectCallback : reject ,
307
307
} ) ;
308
308
} ) ;
0 commit comments