change routes to /account instead of /users
This commit is contained in:
parent
ef77e38db2
commit
8e1bb5c333
3 changed files with 15 additions and 16 deletions
|
@ -19,7 +19,7 @@
|
|||
</li>
|
||||
<li>
|
||||
<.link
|
||||
href={~p"/users/settings"}
|
||||
href={~p"/account/settings"}
|
||||
class="text-[0.8125rem] leading-6 text-zinc-900 font-semibold hover:text-zinc-700"
|
||||
>
|
||||
Settings
|
||||
|
@ -27,7 +27,7 @@
|
|||
</li>
|
||||
<li>
|
||||
<.link
|
||||
href={~p"/users/log_out"}
|
||||
href={~p"/account/log_out"}
|
||||
method="delete"
|
||||
class="text-[0.8125rem] leading-6 text-zinc-900 font-semibold hover:text-zinc-700"
|
||||
>
|
||||
|
@ -37,7 +37,7 @@
|
|||
<% else %>
|
||||
<li>
|
||||
<.link
|
||||
href={~p"/users/register"}
|
||||
href={~p"/account/register"}
|
||||
class="text-[0.8125rem] leading-6 text-zinc-900 font-semibold hover:text-zinc-700"
|
||||
>
|
||||
Register
|
||||
|
@ -45,7 +45,7 @@
|
|||
</li>
|
||||
<li>
|
||||
<.link
|
||||
href={~p"/users/log_in"}
|
||||
href={~p"/account/log_in"}
|
||||
class="text-[0.8125rem] leading-6 text-zinc-900 font-semibold hover:text-zinc-700"
|
||||
>
|
||||
Log in
|
||||
|
|
|
@ -52,13 +52,13 @@ defmodule WildWeb.Router do
|
|||
|
||||
live_session :redirect_if_user_is_authenticated,
|
||||
on_mount: [{WildWeb.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
|
||||
live "/account/register", UserRegistrationLive, :new
|
||||
live "/account/log_in", UserLoginLive, :new
|
||||
live "/account/reset_password", UserForgotPasswordLive, :new
|
||||
live "/account/reset_password/:token", UserResetPasswordLive, :edit
|
||||
end
|
||||
|
||||
post "/users/log_in", UserSessionController, :create
|
||||
post "/account/log_in", UserSessionController, :create
|
||||
end
|
||||
|
||||
scope "/", WildWeb do
|
||||
|
@ -66,20 +66,20 @@ defmodule WildWeb.Router do
|
|||
|
||||
live_session :require_authenticated_user,
|
||||
on_mount: [{WildWeb.UserAuth, :ensure_authenticated}] do
|
||||
live "/users/settings", UserSettingsLive, :edit
|
||||
live "/users/settings/confirm_email/:token", UserSettingsLive, :confirm_email
|
||||
live "/account/settings", UserSettingsLive, :edit
|
||||
live "/account/settings/confirm_email/:token", UserSettingsLive, :confirm_email
|
||||
end
|
||||
end
|
||||
|
||||
scope "/", WildWeb do
|
||||
pipe_through [:browser]
|
||||
|
||||
delete "/users/log_out", UserSessionController, :delete
|
||||
delete "/account/log_out", UserSessionController, :delete
|
||||
|
||||
live_session :current_user,
|
||||
on_mount: [{WildWeb.UserAuth, :mount_current_user}] do
|
||||
live "/users/confirm/:token", UserConfirmationLive, :edit
|
||||
live "/users/confirm", UserConfirmationInstructionsLive, :new
|
||||
live "/account/confirm/:token", UserConfirmationLive, :edit
|
||||
live "/account/confirm", UserConfirmationInstructionsLive, :new
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue