redirect users to /sites after login

This commit is contained in:
Uku Taht 2020-04-01 10:37:30 +03:00
parent 4c934e2737
commit 074e895204
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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