We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b47a7e8 commit dee2b07Copy full SHA for dee2b07
lib/algora_web/controllers/tip_controller.ex
@@ -36,10 +36,7 @@ defmodule AlgoraWeb.TipController do
36
else
37
# TODO: just use a plug
38
{:error, :unauthorized} ->
39
- conn
40
- |> put_session(:user_return_to, conn.request_path <> "?" <> conn.query_string)
41
- |> put_flash(:error, "You must be logged in to tip")
42
- |> redirect(to: ~p"/auth/login")
+ redirect(conn, to: ~p"/auth/login?#{%{return_to: conn.request_path <> "?" <> conn.query_string}}")
43
44
{:error, reason} ->
45
conn
0 commit comments