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

re

parent c62e1a18
No related branches found
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 ('cobaye','"+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){
......
......@@ -31,12 +31,11 @@ function Submit (props) {
equipe: props.equipe.value,
participant: props.participant.value
})
.then(() => {
axios.post('/api/admin/new_participant_with_id',
{
id: props.participant.value,
name: props.participant.label
})})
})
.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