Hi everyone, I'm developing a project using Titanium with Appcelerator. At the moment, the thing I'm trying to do is the following: + Inside my custom objects, in a table called "menu", I have a list of items + Those items have an attribute called "available" (boolean) with true as default value + I want to press a button on my app interface to set the attribute value of a specific item as false When I press that button I get this error on Titanium console:
[ERROR] : 400: Failed to authenticate user [INFO] : ALERT: (KrollRuntimeThread) [17303,19424] Error: [INFO] : ALERT: Failed to authenticate user
Here is the code:
button.addEventListener('click',function(e) { Cloud.Objects.update({ classname: 'menu', id: p.id, fields: { available: false, } }, function (e) { if (e.success) { var car = e.cars[0]; alert('Taken'); } else { alert('Error:\n' + ((e.error && e.message) || JSON.stringify(e))); } }); Titanium.API.info("You clicked the button"); });Do you have any suggestions? Why can I query for results but I can't update? Maybe a permission problem? How can I fix it? The "p.id" works correctly, it gets the correct item's id.