Skip to content

Commit

Permalink
ci: credo
Browse files Browse the repository at this point in the history
  • Loading branch information
joaodiaslobo committed Nov 5, 2024
1 parent 75b5787 commit 73152e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/safira_web/plugs/user_roles.ex
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ defmodule SafiraWeb.UserRoles do
end

def require_no_credential(conn, _opts) do
if not has_credential?(conn) do
conn
else
if has_credential?(conn) do
conn
|> put_flash(
:error,
gettext("You already have a credential assigned to your account.")
)
|> redirect(to: ~p"/app")
|> halt()
else
conn
end
end

Expand Down

0 comments on commit 73152e1

Please sign in to comment.