I'm trying to update some properties on a tournament using javascript and the Leaguevine API.
When I do the PUT api call I get a 500: bad request response. The message in the json response says that it's the server at fault and that I should try again later. For some reason I believe that the fault is on my part. Does someone see anything wrong with the code (all the variables exist are not null/undefined)
$.ajax({
url: config.api_url+config.tournamentID+'/',
success: function(data) {
if(typeof data !== 'object') {
data = $.parseJSON(data);
}
console.log(data);
},
data: {
name: "Hello name"
},
type: 'PUT',
error: function(data) {
if(typeof data !== 'object') {
data = $.parseJSON(data);
}
console.log(data);
},
headers: {
Authorization: 'bearer '+config.access_token
}
});