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

dz

parent 899d533c
Branches
No related tags found
No related merge requests found
......@@ -157,7 +157,7 @@ function addNewParticipant(req, res){
function addNewParticipantWithId(req, res){
var con = mysql.createConnection(dbConfig);
var query = "INSERT IGNORE INTO `Participant` (`id`, `name`) VALUES ("+req.body.id+",'"+req.body.name+"');"
var query = "INSERT IGNORE INTO `Participant` (`id`, `name`) VALUES ('"+req.body.id+"','"+req.body.name+"');"
con.connect();
con.query(query, (err, result) => {
if(err){
......
......@@ -29,14 +29,14 @@ function Submit (props) {
{
score: props.score,
equipe: props.equipe.value,
participant: 5000//props.participant.value
participant: props.participant.value
})
.then(() => {
axios.post('/api/admin/new_participant_with_id',
{
id: 5000,//props.participant.value,
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