Skip to content

Instantly share code, notes, and snippets.

@brunoripa
Last active May 24, 2019 16:13
Show Gist options
  • Save brunoripa/8e174817cdcd48e59af07130f9728574 to your computer and use it in GitHub Desktop.
Save brunoripa/8e174817cdcd48e59af07130f9728574 to your computer and use it in GitHub Desktop.
defmodule ElixirTestOneWeb.KeysController do
use ElixirTestOneWeb, :controller
@spec index(Plug.Conn.t(), any()) :: Plug.Conn.t()
def index(conn, _opts) do
conn
|> json(%{
keys:
Application.get_env(:app, :config_keys)
|> Enum.into(%{})
})
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment