For Deleting a document from Database i do GET to
GETOrder: function(CodeOder) {
alert("http://lite.couchbase./DB/"+CodeOder);
return $http({method: "GET", url:
database+"/"+CodeOder,
cache: $templateCache})
.success(function (data, status) {
var rev= data._rev;
deleteWith(rev,CodeOder);
})
.error(function (data, status) {
alert("error getting local order !!");
});
},
And the i do Delete
var deleteWith =function(rev,id) {
var url="http://lite.couchbase./DB/"+id+"?rev="
+rev;
$http({method: "DELETE", url: url, cache:
$templateCache}).
success(function(data, status) {
alert("Success deleting order ");
gettingDoc(id,rev);
}).
error(function(data, status) {
data = data || "Request failed";
alert("error deleting doc !"+status);
});
};
And in the success of Delete when i GET the document for the second time i
still found it with the same revision ???
--
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/8b26988b-78ae-4b34-a388-736574d29425%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.