Oh wait. I can just check
function (doc, old_doc) {
if (old_doc && doc._deleted) {
} else { // do error checking
}
}
right?
slim
On Friday, February 20, 2015 at 8:04:11 PM UTC-5, Seung Chan Lim wrote:
>
> What I'm trying to do is delete a document through the sync gateway. But
> my sync function won't let me do it for this reason
>
> Sync fn rejected: new=map[_deleted:true
> _rev:15-663c3c699eed204714085666df9fe784
> _id:c493aedaa7ba443489d1784c0e792436]
> old={"_deleted":true,"date":["2015-02-20T23:47:19.831580"],"owner":"9078b916ac8b49f789f28818ab0eeef0","request_language":"en","request_type":1002,"type":["Request"]}
>
> --> 403 Type must be speficied on all documents.
>
> That 403 is me and my sync function rejecting any document that doesn't
> have a type. This is purely for my own error checking. But I don't want to
> bother with this logic if I'm trying to DELETE a document.
>
> Is there a way to notice that what I'm dealing with is a DELETE request in
> the sync function such that I can bypass this logic?
>
> slim
>
--
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/2b8bf9e5-8aed-45bb-a6a1-3265f5ed084d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.