You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2020/01/05 12:03:33 UTC

[couchdb] 01/02: reafactor: generalise sync_admin to sync_config

This is an automated email from the ASF dual-hosted git repository.

jan pushed a commit to branch feat/1752/setup-uuid-and-auth-secret
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 0313cf8de1abf18ca88873b3860689e3279ea330
Author: Jan Lehnardt <ja...@apache.org>
AuthorDate: Sun Jan 5 12:46:15 2020 +0100

    reafactor: generalise sync_admin to sync_config
---
 src/setup/src/setup.erl | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/setup/src/setup.erl b/src/setup/src/setup.erl
index 9437fbc..e1d66d7 100644
--- a/src/setup/src/setup.erl
+++ b/src/setup/src/setup.erl
@@ -241,8 +241,11 @@ sync_admins() ->
 
 
 sync_admin(User, Pass) ->
+    sync_config("admins", User, Pass).
+
+sync_config(Section, Key, Value) ->
     {Results, Errors} = rpc:multicall(other_nodes(), config, set,
-        ["admins", User, Pass]),
+        [Section, Key, Value]),
     case validate_multicall(Results, Errors) of
         ok ->
             ok;