rename project from SimpleshopTheme to Berrypod
All modules, configs, paths, and references updated. 836 tests pass, zero warnings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
30
lib/berrypod_web/live/auth/settings.ex
Normal file
30
lib/berrypod_web/live/auth/settings.ex
Normal file
@@ -0,0 +1,30 @@
|
||||
defmodule BerrypodWeb.Auth.Settings do
|
||||
use BerrypodWeb, :live_view
|
||||
|
||||
alias Berrypod.Accounts
|
||||
|
||||
# Confirm-email token: process it and redirect to admin settings
|
||||
@impl true
|
||||
def mount(%{"token" => token}, _session, socket) do
|
||||
socket =
|
||||
case Accounts.update_user_email(socket.assigns.current_scope.user, token) do
|
||||
{:ok, _user} ->
|
||||
put_flash(socket, :info, "Email changed successfully.")
|
||||
|
||||
{:error, _} ->
|
||||
put_flash(socket, :error, "Email change link is invalid or it has expired.")
|
||||
end
|
||||
|
||||
{:ok, redirect(socket, to: ~p"/admin/settings")}
|
||||
end
|
||||
|
||||
# Main mount: just redirect — account settings live in admin now
|
||||
def mount(_params, _session, socket) do
|
||||
{:ok, redirect(socket, to: ~p"/admin/settings")}
|
||||
end
|
||||
|
||||
@impl true
|
||||
def render(assigns) do
|
||||
~H""
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user