@@ -239,7 +239,7 @@ async function createFirebaseAccount(admin: any, osmID: any, displayName: any, a
239239 // check if profile exists on Firebase Realtime Database
240240 const profileExists = await admin
241241 . database ( )
242- . ref ( `v2/users/osm: ${ id } /` )
242+ . ref ( `v2/users/${ uid } /` )
243243 . get ( )
244244 . then ( ( snapshot : any ) => { return snapshot . exists ( ) } ) ;
245245
@@ -272,7 +272,7 @@ async function createFirebaseAccount(admin: any, osmID: any, displayName: any, a
272272 const profileUpdateTask = admin
273273 . database ( )
274274 . ref ( `v2/users/${ uid } /` )
275- . update ( { displayName } )
275+ . update ( { displayName } ) ;
276276
277277 const profileCreationTask = admin
278278 . database ( )
@@ -284,14 +284,13 @@ async function createFirebaseAccount(admin: any, osmID: any, displayName: any, a
284284 taskContributionCount : 0 ,
285285 displayName,
286286 } ) ;
287- }
288287
289- const tasks = [ userCreationTask , databaseTask ]
288+ const tasks = [ userCreationTask , databaseTask ] ;
290289
291290 if ( profileExists ) {
292- tasks . push ( profileUpdateTask )
291+ tasks . push ( profileUpdateTask ) ;
293292 } else {
294- tasks . push ( profileCreationTask )
293+ tasks . push ( profileCreationTask ) ;
295294 }
296295
297296 // Wait for all async task to complete then generate and return a custom auth token.
0 commit comments