Skip to content

Commit 5206d30

Browse files
committed
refactor
1 parent 6f4a7ed commit 5206d30

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/algora/admin/admin.ex

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@ defmodule Algora.Admin do
2929
end
3030

3131
def magic(identifier, return_to \\ nil) do
32-
if String.match?(identifier, ~r/@/) do
33-
magic(:email, identifier, return_to)
34-
else
35-
magic(:handle, identifier, return_to)
36-
end
32+
magic(if(String.match?(identifier, ~r/@/), do: :email, else: :handle), identifier, return_to)
3733
end
3834

3935
def screenshot(path), do: AlgoraWeb.OGImageController.take_and_upload_screenshot([path])

0 commit comments

Comments
 (0)