Hello,


The document is deleted when i try to update it !!  PUT + Document_revision 
==> Delete !!! 

This is my code :


                       return  $http({method: "GET", url: database+"/"+CodCmd, 
cache: $templateCache})

                       .success(function (data, status) {

                                var rev2= data._rev;

                                var url=database+"/"+CodCmd+"?rev="+rev2;

                                $http({method: "PUT", url: 
url,data:JSON.stringify(cmd), cache: $templateCache}).

                                success(function(data, status) {

                                        alert("Success updating Command ");

                                        }).

                                error(function(data, status) {

                                      alert("error updating Command, status 
= "+status);

                                      });

                                })

                       .error(function (data, status) {

                              alert("error getting local Cmd !!");

                              });

Thanks 

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/68429718-0ac0-40fa-92ab-798826f76a09%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to