Invoking an update service with Javascript
I'm trying to call an update service to add a value to an existing DB entry. I have the ID, and I generated an update service, and imported it into the pages data services. I'm trying to call it this code:
updateHuntQuestions.execute({
data: {
'_id' : huntId,
'colName': {
'Questions':questions
}
},
success : function(){ console.log('added questions');},
error: function(){ console.log('error adding questions');}
});
And I'm getting this:https://api.appery.io/rest/1/db/colle...
with a bad request. I verified that the huntId variable is being set correctly, so clearly I'm doing something wrong in invoking the service, but I'm not sure what it is that I'm doing wrong. The other parameter is an array of strings, and as far as I can tell is also being set correctly.
Thanks!