Skip to content

Commit d723f3e

Browse files
committed
FIx
1 parent a106beb commit d723f3e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

services/app/apps/codebattle/lib/codebattle_web/plugs/force_redirect.ex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ defmodule CodebattleWeb.Plugs.ForceRedirect do
2727
@allowed_banned_paths [
2828
# ~r{^\/$},
2929
# ~r{^\/e\/\S+\/?$},
30-
~r{^\/maintenance\/?$},
30+
~r{^\/maintenance\/?$}
3131
# ~r{^\/api\/v1\/events\/.+$},
3232
# ~r{^\/auth\/token\/?$}
3333
]
@@ -43,7 +43,8 @@ defmodule CodebattleWeb.Plugs.ForceRedirect do
4343
User.admin?(conn.assigns.current_user) ->
4444
conn
4545

46-
conn.assigns.current_user.subscription_type == :banned && !Enum.any?(@allowed_banned_paths, &Regex.match?(&1, conn.request_path)) ->
46+
conn.assigns.current_user.subscription_type == :banned &&
47+
!Enum.any?(@allowed_banned_paths, &Regex.match?(&1, conn.request_path)) ->
4748
conn
4849
|> redirect(to: "/maintenance")
4950
|> halt()

0 commit comments

Comments
 (0)