Skip to content

Commit ed806f6

Browse files
committed
fix: clean up
1 parent 3430784 commit ed806f6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

firebase/functions/src/osm_auth.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,6 @@ async function createFirebaseAccount(admin: any, osmID: any, displayName: any, a
240240

241241
// check if profile exists on Firebase Realtime Database
242242
const snapshot = await profileRef.once('value');
243-
functions.logger.log('Snapshot value:', snapshot.val());
244243
const profileExists = snapshot.exists();
245244

246245
// Save the access token to the Firebase Realtime Database.
@@ -268,9 +267,8 @@ async function createFirebaseAccount(admin: any, osmID: any, displayName: any, a
268267
throw error;
269268
});
270269

271-
// Only update display name if profile exists, else create profile
270+
// If profile exists, only update displayName -- else create new user profile
272271
const tasks = [userCreationTask, databaseTask];
273-
274272
if (profileExists) {
275273
functions.logger.log('Sign in to existing OSM profile');
276274
const profileUpdateTask = profileRef.update({ displayName: displayName });

0 commit comments

Comments
 (0)