Skip to content

Commit 3c19cf3

Browse files
committed
fix apply with github redirect
1 parent aa7f62f commit 3c19cf3

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

lib/algora_web/live/hn_jobs_live.ex

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -291,16 +291,10 @@ defmodule AlgoraWeb.HNJobsLive do
291291
{:noreply, put_flash(socket, :error, "Failed to submit application. Please try again.")}
292292
end
293293
else
294-
{:noreply,
295-
socket
296-
|> push_event("store-session", %{user_return_to: "/jobs"})
297-
|> redirect(external: Algora.Github.authorize_url())}
294+
{:noreply, redirect(socket, external: Algora.Github.authorize_url(%{return_to: "/hn/jobs"}))}
298295
end
299296
else
300-
{:noreply,
301-
socket
302-
|> push_event("store-session", %{user_return_to: "/jobs"})
303-
|> redirect(external: Algora.Github.authorize_url())}
297+
{:noreply, redirect(socket, external: Algora.Github.authorize_url(%{return_to: "/hn/jobs"}))}
304298
end
305299
end
306300

0 commit comments

Comments
 (0)