fix typos

This commit is contained in:
Jacob Levine 2019-02-12 20:34:05 -06:00
parent 45a4387c68
commit dd5da3b1e8
2 changed files with 55 additions and 51 deletions

View File

@ -2,8 +2,6 @@
<html lang="en" dir="ltr"> <html lang="en" dir="ltr">
<head> <head>
<meta charset="utf-8">
<title>
<meta charset="utf-8"> <meta charset="utf-8">
<title>titanscout</title> <title>titanscout</title>
<script src="https://www.gstatic.com/firebasejs/5.7.2/firebase.js"></script> <script src="https://www.gstatic.com/firebasejs/5.7.2/firebase.js"></script>

View File

@ -49,7 +49,8 @@ window.onload = function() {
} }
teamAssoc = firebase.firestore().collections('UserAssociations').doc(user.uid); teamAssoc = firebase.firestore().collections('UserAssociations').doc(user.uid);
teamAssoc.get().then(function(doc) { teamAssoc.get().then(function(doc) {
if(doc.exists)}{ if (doc.exists)
} {
list = doc.data() list = doc.data()
teamNums = Object.keys(list) teamNums = Object.keys(list)
document.getElementById(teammem).innerHTML = "" document.getElementById(teammem).innerHTML = ""
@ -62,11 +63,15 @@ window.onload = function() {
}) })
}); });
} }
function cnt(tn) { function cnt(tn) {
firebase.firestore().collection("UserAssociations").doc(user.id).set({tn : 'captain'} , { merge: true }).then( firebase.firestore().collection("UserAssociations").doc(user.id).set({
teamAssoc=firebase.firestore().collections('UserAssociations').doc(user.uid); tn: 'captain'
teamAssoc.get().then(function(doc){ }, {
if(doc.exists)}{ merge: true
}).then(
teamAssoc = firebase.firestore().collections('UserAssociations').doc(user.uid) teamAssoc.get().then(function(doc) {
if (doc.exists) {
list = doc.data() list = doc.data()
teamNums = Object.keys(list) teamNums = Object.keys(list)
document.getElementById(teammem).innerHTML = "" document.getElementById(teammem).innerHTML = ""
@ -79,6 +84,7 @@ function cnt(tn) {
}) })
) )
} }
function signout() { function signout() {
var user = firebase.auth().currentUser; var user = firebase.auth().currentUser;
firebase.auth().signOut().then( firebase.auth().signOut().then(