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

test int

parent 49d47242
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 ('"+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,13 +29,14 @@ function Submit (props) {
{
score: props.score,
equipe: props.equipe.value,
participant: 500//props.participant.value
participant: 5000//props.participant.value
})
.then(() => {
axios.post('/api/admin/new_participant_with_id',
{
id: 500,//props.participant.value,
id: 5000,//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