Skip to content

Commit

Permalink
Always use keyword list for basic_auth config
Browse files Browse the repository at this point in the history
  • Loading branch information
michalwarda committed Feb 28, 2024
1 parent 7f66cf8 commit f0ddeaf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/api/config/dev.exs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ config :buildel, Buildel.Vault,

config :langchain, openai_key: fn -> System.get_env("OPENAI_API_KEY") end

config :buildel, :basic_auth, %{username: "michalmichal", password: "rzadzirzadzi"}
config :buildel, :basic_auth, username: "michalmichal", password: "rzadzirzadzi"

config :buildel, :nlm_api_url, "http://localhost:5010"

Expand Down
2 changes: 1 addition & 1 deletion apps/api/lib/buildel_web/basic_auth.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule BuildelWeb.BasicAuth do
alias Plug.BasicAuth

def basic_auth(conn, _opts) do
%{ username: username, password: password } = Application.fetch_env!(:buildel, :basic_auth)
[username: username, password: password] = Application.fetch_env!(:buildel, :basic_auth)
BasicAuth.basic_auth(conn, username: username, password: password)
end
end

0 comments on commit f0ddeaf

Please sign in to comment.