From c046b8e5d295e8d662bf67890b3df5246ebfdbc4 Mon Sep 17 00:00:00 2001 From: CJ_Clippy Date: Tue, 14 Jan 2025 19:09:01 -0800 Subject: [PATCH] disable login --- config/deploy.yml | 13 +++--- .../components/layouts/root.html.heex | 40 +++++++++---------- services/bright/lib/bright_web/router.ex | 24 ++++++----- 3 files changed, 41 insertions(+), 36 deletions(-) diff --git a/config/deploy.yml b/config/deploy.yml index 93763a9..7516460 100644 --- a/config/deploy.yml +++ b/config/deploy.yml @@ -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 diff --git a/services/bright/lib/bright_web/components/layouts/root.html.heex b/services/bright/lib/bright_web/components/layouts/root.html.heex index 7e6d3f7..69ab04a 100644 --- a/services/bright/lib/bright_web/components/layouts/root.html.heex +++ b/services/bright/lib/bright_web/components/layouts/root.html.heex @@ -97,25 +97,25 @@ - <%= if @current_user do %> - <.link - href={~p"/profile"} - class="navbar-item"> - Profile - - <.link - href={~p"/users/settings"} - class="navbar-item" - > - Settings - - <.link - href={~p"/users/log_out"} - method="delete" - class="navbar-item" - > - Log out - + diff --git a/services/bright/lib/bright_web/router.ex b/services/bright/lib/bright_web/router.ex index 967dfd6..4d54b34 100644 --- a/services/bright/lib/bright_web/router.ex +++ b/services/bright/lib/bright_web/router.ex @@ -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]