Skip to content
Snippets Groups Projects
Commit 2afa0cef authored by Thomas Bouquet's avatar Thomas Bouquet
Browse files

fix repetition of assos

parent 09014e3c
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,8 @@ function getClassementIndividuel(req, res){
let leader_indiv={};
for(const data of result){
if(data.id in leader_indiv){
leader_indiv[data.id].equipes.unshift(data.equipe_name);
if (!(data.equipe_name in leader_indiv[data.id].equipes)) {
leader_indiv[data.id].equipes.unshift(data.equipe_name);}
leader_indiv[data.id].score += data.score;
leader_indiv[data.id].nbScores += 1;
}else{
......
......@@ -36,7 +36,7 @@ function Submit (props) {
{
id: props.participant.value,
name: props.participant.label
});console.log("hey")})
})})
.then(() => {
alert("Score ajouté");
window.location='/Input';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment