minor template changes
This commit is contained in:
parent
b55e84acd1
commit
fe5e036c3e
3 changed files with 10 additions and 6 deletions
|
|
@ -8,7 +8,8 @@ key=`mix phx.gen.secret`
|
|||
echo 'export SECRET_KEY_BASE='$key >> ~/.bashrc
|
||||
fi
|
||||
if [ -z "$PORT"]; then
|
||||
echo 'export PORT=443' >> ~/.bashrc
|
||||
echo 'export PORT=80' >> ~/.bashrc
|
||||
# echo 'export PORT=443' >> ~/.bashrc that was a mistake. it is http port in prod
|
||||
fi
|
||||
# and cert paths
|
||||
if [ -z "$GCLP_SSL_KEY_PATH"]; then
|
||||
|
|
|
|||
|
|
@ -10,9 +10,11 @@ defmodule LpWeb.GitController do
|
|||
def show(conn, _params) do
|
||||
html(conn,"")
|
||||
end
|
||||
def oauth(conn, _params) do
|
||||
# render(conn, "oauth2.html")
|
||||
redirect(conn, "git.html")
|
||||
def oauth(conn, %{"code" => code}) do
|
||||
render(conn, "oauth2.html", code: code)
|
||||
# redirect(conn, "git.html")
|
||||
html(conn,"")
|
||||
|
||||
end
|
||||
def github(conn, _params) do
|
||||
authorize_url = Github.Oauth2.Client.authorize_url!(
|
||||
|
|
@ -22,4 +24,4 @@ defmodule LpWeb.GitController do
|
|||
)
|
||||
conn |> redirect(external: authorize_url)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
<H1> Autorisation succeded </H1>
|
||||
todo. keep context
|
||||
Your key is: <%= @code %>!
|
||||
todo. keep context
|
||||
|
|
|
|||
Reference in a new issue