web/firebase/index.js
/**
 * Checks to see if a given user has an document in the Firestore users collection and if no,
 * creates a new document for them
 * @param {object} user - User JS object retrieved from the Google login API
 */
Checks to see if a given user has an document in the Firestore users collection and if no,
creates a new document for them
@param {object} user - User JS object retrieved from the Google login API
Checks to see if a given user has an document in the Firestore users collection and if no creates a new document for them @param { object } user - User JS object retrieved from the Google login API
function userExists(user) {
  var exists = db.collection("users").doc(user.email).get().then(function (doc) {
    if (!doc.exists) pushNewUserToFirebase(user);
  });
}
function userExists ( user ) { var exists = db . collection ( "users" ) . doc ( user . email ) . get ( ) . then ( function ( doc ) { if ( ! doc . exists ) pushNewUserToFirebase ( user ) ; } ) ; }
Checks to see if a given user has an document in the Firestore users collection and if no,
 creates a new document for them
 @param {object} user - User JS object retrieved from the Google login API
Checks to see if a given user has an document in the Firestore users collection and if no creates a new document for them @param { object } user - User JS object retrieved from the Google login API