A problem of updating data using DatabaseUser
Hello! I'm trying to update an array to my USERS collection in database but meet some problem! I follow this tutorial http://docs.appery.io/documentation/b... my service's server code is here:
____________________________________________________var dbId = "53157a73e4b0fe98ca23a847";
var friend_id = request.get("friend_id");
var id = request.get("_id");
var username=request.get("username");
var password=request.get("password");
var token = DatabaseUser.login(dbId, username, password).sessionToken;
//var token = request.get("sessionToken");
var updated = DatabaseUser.update(dbId, id, {
"friend": {"__op":"AddUnique","objects":[friend_id]}
}, token);
response.success();
This code can be tested successfully in the SERVER CODE ,but when I invoke this service in my app, it seems that the service can't stop(or maybe can't get a correct response),because the SUCCESS EVENT of this service never be triggered but the data I want to update have already been add to the database....
,
what's worse ,I've got another 2 service like this ......Please help!!T T