disable login

This commit is contained in:
CJ_Clippy 2025-01-14 19:09:01 -08:00
parent 4eba121d15
commit c046b8e5d2
3 changed files with 41 additions and 36 deletions

View File

@ -41,6 +41,8 @@ registry:
# Configure builder setup.
builder:
args:
MIX_ENV: prod
arch: amd64
dockerfile: ./dockerfiles/bright.dockerfile
# Pass in additional build args needed for your Dockerfile.
@ -90,11 +92,12 @@ ssh:
#
accessories:
superstreamer:
env:
clear:
PUBLIC_API_ENDPOINT: https://api.superstreamer.futureporn.net
PUBLIC_STITCHER_ENDPOINT: http://localhost:52002
# superstreamer:
# host: 45.76.57.101
# env:
# clear:
# PUBLIC_API_ENDPOINT: https://api.superstreamer.futureporn.net
# PUBLIC_STITCHER_ENDPOINT: http://localhost:52002
db:
image: postgres:15

View File

@ -97,25 +97,25 @@
<%= if @current_user do %>
<.link
href={~p"/profile"}
class="navbar-item">
Profile
</.link>
<.link
href={~p"/users/settings"}
class="navbar-item"
>
Settings
</.link>
<.link
href={~p"/users/log_out"}
method="delete"
class="navbar-item"
>
Log out
</.link>
<!-- <%= if @current_user do %>
<.link
href={~p"/profile"}
class="navbar-item">
Profile
</.link>
<.link
href={~p"/users/settings"}
class="navbar-item"
>
Settings
</.link>
<.link
href={~p"/users/log_out"}
method="delete"
class="navbar-item"
>
Log out
</.link>
<% else %>
<.link
href={~p"/users/register"}
@ -129,7 +129,7 @@
>
Log in
</.link>
<% end %>
<% end %> -->
</div>
</div>

View File

@ -53,6 +53,8 @@ defmodule BrightWeb.Router do
resources "/vtubers", VtuberController do
get "/vods/new", VodController, :new
get "/vods", VodController, :index
get "/vods/:id", VodController, :show
post "/vods", VodController, :create
get "/vtubers/:id/edit", VtuberController, :edit
end
@ -144,19 +146,19 @@ defmodule BrightWeb.Router do
## Authentication routes
scope "/", BrightWeb do
pipe_through [:browser, :redirect_if_user_is_authenticated]
# scope "/", BrightWeb do
# pipe_through [:browser, :redirect_if_user_is_authenticated]
live_session :redirect_if_user_is_authenticated,
on_mount: [{BrightWeb.UserAuth, :redirect_if_user_is_authenticated}] do
live "/users/register", UserRegistrationLive, :new
live "/users/log_in", UserLoginLive, :new
live "/users/reset_password", UserForgotPasswordLive, :new
live "/users/reset_password/:token", UserResetPasswordLive, :edit
end
# live_session :redirect_if_user_is_authenticated,
# on_mount: [{BrightWeb.UserAuth, :redirect_if_user_is_authenticated}] do
# live "/users/register", UserRegistrationLive, :new
# live "/users/log_in", UserLoginLive, :new
# live "/users/reset_password", UserForgotPasswordLive, :new
# live "/users/reset_password/:token", UserResetPasswordLive, :edit
# end
post "/users/log_in", UserSessionController, :create
end
# post "/users/log_in", UserSessionController, :create
# end
scope "/", BrightWeb do
pipe_through [:browser, :require_authenticated_user]