I am doing a unity web request, that sends the selected bet to the server. It send the bet fine to the server but when I change the bet I get an error that says
undefined:1 0,1 ^
SyntaxError: Unexpected token , in JSON at position 1
This example is when I try to change the bet from 0.1 to 0.5 Somehow the bet doesn't update and the period changes to comma. I am 90% sure this happens because the server side code is wrong, because I tested this out in the unity editor and it was sending the correct bet everytime. I belive it is on the first lines of code so here it is:
router.get('/:bet',async (req,res) =>{
const parameter = JSON.parse(req.params.bet)
const BET = parameter.bet
req.session.bet = BET
})