From 3d999732cfcf72f110cf93cbc245429fb066db06 Mon Sep 17 00:00:00 2001
From: Thomas Bouquet <thomas.bouquet@student-cs.fr>
Date: Fri, 5 Mar 2021 12:14:40 +0100
Subject: [PATCH] Nope

---
 .../src/controllers/participant.controller.js |  2 +-
 front/src/components/Login/SubmitForm.js      | 30 -------------------
 2 files changed, 1 insertion(+), 31 deletions(-)

diff --git a/back/src/controllers/participant.controller.js b/back/src/controllers/participant.controller.js
index 42c259b1..994caf19 100644
--- a/back/src/controllers/participant.controller.js
+++ b/back/src/controllers/participant.controller.js
@@ -15,7 +15,7 @@ const dbConfig = {
 
 function getClassementIndividuel(req, res) {
   var con = mysql.createConnection(dbConfig);
-  var query = "SELECT  Participant.id as id, Participant.name as name, score, Equipe.name AS equipe_name FROM Score  JOIN Participant ON Participant.id=Score.participantId  JOIN Equipe ON Score.equipeId = Equipe.id  WHERE  (Score.deleted = 0  AND  Participant.deleted=0 AND Participant.id != 'sprint')  ORDER BY score DESC;"
+  var query = "SELECT  Participant.id as id, Participant.name as name, score, Equipe.name AS equipe_name FROM Score  JOIN Participant ON Participant.id=Score.participantId  JOIN Equipe ON Score.equipeId = Equipe.id  WHERE  Score.deleted = 0  AND  Participant.deleted=0  ORDER BY score DESC;"
   con.connect();
   con.query(query, (err, result) => {
     if (err) {
diff --git a/front/src/components/Login/SubmitForm.js b/front/src/components/Login/SubmitForm.js
index 1c274a17..38955282 100644
--- a/front/src/components/Login/SubmitForm.js
+++ b/front/src/components/Login/SubmitForm.js
@@ -1,13 +1,9 @@
 import React, { useState, useEffect } from "react";
 import { MDBRow, MDBCol, MDBInput, MDBBtn, MDBCard, MDBCardBody, MDBModalFooter, MDBIcon, MDBContainer } from 'mdbreact';
 import axios from 'axios';
-import eventData from "../../eventData/eventData.json";
 
 function Submit(props) {
 
-    const now = Date.now() < 0;
-    console.log(now);
-
     /*var [participants,setParticipants] = useState([]);
         useEffect(() => {
             const interval = setInterval(() => {
@@ -29,8 +25,6 @@ function Submit(props) {
         })
         }*/
 
-        if (now < 0) {
-
         axios.post('/api/staff/new_score',
             {
                 score: Math.max(0, props.score),
@@ -50,30 +44,6 @@ function Submit(props) {
             }, (error) => {
                 console.log(error);
             })
-
-        }
-
-        else {
-            axios.post('/api/staff/new_score',
-            {
-                score: Math.max(0, props.score),
-                equipe: props.equipe.value,
-                participant: "sprint"
-            })
-            .then(() => {
-                axios.post('/api/staff/new_participant_with_id',
-                    {
-                        id: "sprint",
-                        name: "Sprint"
-                    })
-            })
-            .then(() => {
-                alert("Score ajouté");
-                window.location = '/Input';
-            }, (error) => {
-                console.log(error);
-            })
-        }
     };
 
 
-- 
GitLab