From 73152e1880311eb0b94f03123a8850f639d038de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lobo?= Date: Tue, 5 Nov 2024 02:29:56 +0000 Subject: [PATCH] ci: credo --- lib/safira_web/plugs/user_roles.ex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/safira_web/plugs/user_roles.ex b/lib/safira_web/plugs/user_roles.ex index 7be49c03..09d4f2da 100644 --- a/lib/safira_web/plugs/user_roles.ex +++ b/lib/safira_web/plugs/user_roles.ex @@ -28,9 +28,7 @@ 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, @@ -38,6 +36,8 @@ defmodule SafiraWeb.UserRoles do ) |> redirect(to: ~p"/app") |> halt() + else + conn end end