Skip to content

Commit

Permalink
Attachment delete implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
spin committed Aug 13, 2012
1 parent 7bb83e6 commit 667417b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Database/CouchDB/Conduit/Attachment.hs
Expand Up @@ -75,7 +75,15 @@ couchDeleteAttach :: MonadCouch m =>
-> ByteString -- ^ Attachment path
-> Revision -- ^ Document revision
-> m Revision
couchDeleteAttach = undefined
couchDeleteAttach db doc att rev = do
Response _ _ _ bsrc <- couch HT.methodDelete
(attachPath db doc att)
[]
[("rev", Just rev)]
(RequestBodyBS "")
protect'
j <- bsrc $$+- CA.sinkParser A.json
either throw return $ extractRev j

------------------------------------------------------------------------------
-- Internal
Expand Down

0 comments on commit 667417b

Please sign in to comment.