You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ii...@apache.org on 2020/04/10 14:36:41 UTC
[couchdb] branch prototype/fdb-layer updated: Fix incorrect usage
of couch_epi in mango plugin
This is an automated email from the ASF dual-hosted git repository.
iilyak pushed a commit to branch prototype/fdb-layer
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/prototype/fdb-layer by this push:
new 2bb0ccd Fix incorrect usage of couch_epi in mango plugin
new aad871b Merge pull request #2775 from cloudant/mango-plugin-fixup
2bb0ccd is described below
commit 2bb0ccda2935c028b4fe7fc8edd28f0d1a7febf8
Author: ILYA Khlopotov <ii...@apache.org>
AuthorDate: Fri Apr 10 07:06:17 2020 -0700
Fix incorrect usage of couch_epi in mango plugin
Previously we used the value returned from couch_epi apply as is.
However it returns a list of arguments passed in the same order.
---
src/mango/src/mango_plugin.erl | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/mango/src/mango_plugin.erl b/src/mango/src/mango_plugin.erl
index 296a354..de23f8e 100644
--- a/src/mango/src/mango_plugin.erl
+++ b/src/mango/src/mango_plugin.erl
@@ -24,11 +24,14 @@
%% ------------------------------------------------------------------
before_find(HttpReq0) ->
- with_pipe(before_find, [HttpReq0]).
+ [HttpReq1] = with_pipe(before_find, [HttpReq0]),
+ {ok, HttpReq1}.
after_find(HttpReq, HttpResp, Arg0) ->
- with_pipe(after_find, [HttpReq, HttpResp, Arg0]).
+ [_HttpReq, _HttpResp, Arg1] = with_pipe(after_find, [HttpReq, HttpResp, Arg0]),
+ {ok, Arg1}.
+
%% ------------------------------------------------------------------
%% Internal Function Definitions