mirror of
https://github.com/plausible/analytics.git
synced 2024-12-24 01:54:34 +03:00
redirect users to /sites after login
This commit is contained in:
parent
4c934e2737
commit
074e895204
@ -117,7 +117,7 @@ defmodule PlausibleWeb.AuthController do
|
||||
|
||||
if user do
|
||||
if Password.match?(password, user.password_hash || "") do
|
||||
login_dest = get_session(conn, :login_dest) || "/"
|
||||
login_dest = get_session(conn, :login_dest) || "/sites"
|
||||
|
||||
conn
|
||||
|> put_session(:current_user_id, user.id)
|
||||
|
@ -75,7 +75,7 @@ defmodule PlausibleWeb.AuthControllerTest do
|
||||
conn = post(conn, "/login", email: user.email, password: "password")
|
||||
|
||||
assert get_session(conn, :current_user_id) == user.id
|
||||
assert redirected_to(conn) == "/"
|
||||
assert redirected_to(conn) == "/sites"
|
||||
end
|
||||
|
||||
test "email does not exist - renders login form again", %{conn: conn} do
|
||||
|
Loading…
Reference in New Issue
Block a user