]> Entropealabs - wampex_router.git/commitdiff
move configs to router namespace router-implementation
authorChristopher <chris@entropealabs.com>
Fri, 20 Mar 2020 21:54:07 +0000 (16:54 -0500)
committerChristopher <chris@entropealabs.com>
Fri, 20 Mar 2020 21:54:07 +0000 (16:54 -0500)
config/config.exs
lib/router/authentication/repo.ex
lib/router/authentication/user.ex
test/wampex_test.exs

index 7a4a5aef36061286cb7a59da6ae3d78db2b6174a..1321bb37905861e5b735efed4bb62e9b12b76d70 100644 (file)
@@ -1,12 +1,12 @@
 use Mix.Config
 
-config :wampex, Wampex.Router.Authentication.Repo,
+config :wampex_router, Wampex.Router.Authentication.Repo,
   database: "authentication",
   hostname: "localhost",
   port: 26_257,
   username: "root"
 
-config :cluster_kv,
+config :wampex_router,
   topologies: [
     kv: [
       strategy: Cluster.Strategy.Epmd,
@@ -19,6 +19,6 @@ config :cluster_kv,
     ]
   ]
 
-config :wampex,
+config :wampex_router,
   ecto_repos: [Wampex.Router.Authentication.Repo],
   keylen: 32
index 9fe8e4031219a2776d3a1f6643c7d24d1b58ce0b..e4236256c7406f32d350fa4d3fdcbc5929cfa07f 100644 (file)
@@ -1,5 +1,5 @@
 defmodule Wampex.Router.Authentication.Repo do
   use Ecto.Repo,
-    otp_app: :wampex,
+    otp_app: :wampex_router,
     adapter: Ecto.Adapters.Postgres
 end
index 65bf4f957e31345b21bd080db11950789d7dd3eb..8d3e8a2d2ed431380bbc49fe2502e440b306e468 100644 (file)
@@ -42,7 +42,7 @@ defmodule Wampex.Router.Authentication.User do
   end
 
   def create(authid: authid, password: password, realm: realm) do
-    keylen = Application.get_env(:wampex, :keylen)
+    keylen = Application.get_env(:wampex_router, :keylen)
     salt = Crypto.random_string(keylen)
     iterations = Enum.random(10_000..50_000)
 
index 35448214b632546b784619e66ae8af9a64d5607b..7a12881114e96d8b36b1817bf8d121a749b3a436 100644 (file)
@@ -27,7 +27,7 @@ defmodule WampexTest do
   @device "as987d9a8sd79a87ds"
 
   setup_all do
-    topologies = Application.get_env(:cluster_kv, :topologies)
+    topologies = Application.get_env(:wampex_router, :topologies)
 
     [
       server: