Skip to content

Commit

Permalink
fix: build action failing
Browse files Browse the repository at this point in the history
  • Loading branch information
ruilopesm committed Sep 23, 2024
1 parent 98245dd commit 27ed1b2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
20 changes: 10 additions & 10 deletions lib/atomic_web/config.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ defmodule AtomicWeb.Config do
alias Atomic.Accounts

# User is not logged in
def pages(conn, nil, _current_organization) do
default_pages(conn)
def pages(nil, _current_organization) do
default_pages()
end

# User is logged in
def pages(conn, current_user, current_organization) do
def pages(current_user, current_organization) do
if has_permissions?(current_user, current_organization) do
admin_pages(conn, current_organization)
admin_pages(current_organization)
else
user_pages(conn)
user_pages()
end
end

def user_pages(conn) do
default_pages(conn) ++
def user_pages() do
default_pages() ++
[
%{
key: :scanner,
Expand All @@ -33,8 +33,8 @@ defmodule AtomicWeb.Config do
]
end

def admin_pages(conn, current_organization) do
default_pages(conn) ++
def admin_pages(current_organization) do
default_pages() ++
[
%{
key: :departments,
Expand All @@ -60,7 +60,7 @@ defmodule AtomicWeb.Config do
]
end

def default_pages(conn) do
def default_pages() do
[
%{
key: :home,
Expand Down
2 changes: 1 addition & 1 deletion lib/atomic_web/controllers/user_confirmation_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defmodule AtomicWeb.UserConfirmationController do
if user = Accounts.get_user_by_email(email) do
Accounts.deliver_user_confirmation_instructions(
user,
~p"/users/confirm/#{&1}"
&url(~p"/users/confirm/#{&1}")
)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/atomic_web/controllers/user_registration_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ defmodule AtomicWeb.UserRegistrationController do
{:ok, _} =
Accounts.deliver_user_confirmation_instructions(
user,
~p"/users/confirm/#{&1}"
&url(~p"/users/confirm/#{&1}")
)

conn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ defmodule AtomicWeb.UserResetPasswordController do
if user do
Accounts.deliver_user_reset_password_instructions(
user,
~p"/users/reset_password/#{&1}"
&url(~p"/users/reset_password/#{&1}")
)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/atomic_web/live/profile_live/form_component.ex
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ defmodule AtomicWeb.ProfileLive.FormComponent do
Accounts.deliver_update_email_instructions(
applied_user,
user.email,
~p"/users/confirm_email/#{&1}"
&url(~p"/users/confirm_email/#{&1}")
)

"Profile updated successfully, please check your email to confirm the new address."
Expand Down

0 comments on commit 27ed1b2

Please sign in to comment.