mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-11-10 06:54:44 +00:00
test bugfix
This commit is contained in:
parent
d833d0a183
commit
834068244e
@ -98,7 +98,15 @@ function checkKeyMatch(dt,tn,key){
|
|||||||
}
|
}
|
||||||
function reqjt(tn,tc){
|
function reqjt(tn,tc){
|
||||||
user=firebase.auth().currentUser;
|
user=firebase.auth().currentUser;
|
||||||
dict=firebase.firestore().collection('teamData').doc('joinCodes').data();
|
dict={}
|
||||||
|
firebase.firestore().collection('teamData').doc('joinCodes').get().then(function(doc){
|
||||||
|
if (doc.exists) {
|
||||||
|
dict=doc.data();
|
||||||
|
} else {
|
||||||
|
// doc.data() will be undefined in this case
|
||||||
|
console.log("No such document!");
|
||||||
|
}
|
||||||
|
});
|
||||||
if (checkKeyMatch(dict,tn,tc)){
|
if (checkKeyMatch(dict,tn,tc)){
|
||||||
push={};
|
push={};
|
||||||
push[tn]='scout';
|
push[tn]='scout';
|
||||||
@ -116,6 +124,8 @@ function reqjt(tn,tc){
|
|||||||
document.getElementById('teammem').innerHTML = "<tr><td>You are not part of any teams</td></tr>"
|
document.getElementById('teammem').innerHTML = "<tr><td>You are not part of any teams</td></tr>"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}else{
|
||||||
|
alert("You don't have a correct join key. Please check it and try again.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user