delight-im / Android-DDP

[UNMAINTAINED] Meteor's Distributed Data Protocol (DDP) for clients on Android
Apache License 2.0
274 stars 54 forks source link

update() function #78

Closed kinber95 closed 8 years ago

kinber95 commented 8 years ago

Hey i want to update some Data in my Collection from my Android phone like : Map<String, Object> updateQuery = new HashMap<String, Object>(); Map<String, Object> updateValues = new HashMap<String, Object>(); updateQuery.put("_id","xyz"); updateValues.put("_id", "xyz"); updateValues.put("status", "Med. genommen"); meteor.update("patients", updateQuery, updateValues);

my Server Settings:

Patients.allow({ insert: function(userId, doc) { return userId !== "undefined"; // oder !!userId; }, update: function(userId, doc) { return userId !== "undefined"; }, remove: function(userId, doc) { return userId !== "undefined"; } });

I can insert data from the Android Phone in the Collection but the update function dosent work.. can some one help ?

ocram commented 8 years ago

Thanks for your feedback!

Can you add another empty map as the fourth argument to update please and then add new ResultListener() { } (with the methods implemented) as the fifth argument? In that callback, please try to log something.

And in your server code, can you allow all updates temporarily, either by always returning true or by adding the insecure package temporarily? Thanks!

kinber95 commented 8 years ago

Hey i solve the problem, i delete my server settings and it works

ocram commented 8 years ago

Thanks!