Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
allow w parameter for attachments
  • Loading branch information
lazedo committed Jan 4, 2017
1 parent cb0f20e commit 90648a2e0bb4718cdd701f537f3de47dedb9b2c2
Showing 1 changed file with 2 additions and 1 deletion.
@@ -1243,7 +1243,8 @@ db_attachment_req(#httpd{method=Method, user_ctx=Ctx}=Req, Db, DocId, FileNamePa
DocEdited = Doc#doc{
atts = NewAtt ++ [A || A <- Atts, couch_att:fetch(name, A) /= FileName]
},
case fabric:update_doc(Db, DocEdited, [{user_ctx,Ctx}]) of
W = chttpd:qs_value(Req, "w", integer_to_list(mem3:quorum(Db))),
case fabric:update_doc(Db, DocEdited, [{user_ctx,Ctx}, {w,W}]) of
{ok, UpdatedRev} ->
HttpCode = 201;
{accepted, UpdatedRev} ->

0 comments on commit 90648a2

Please sign in to comment.