mirror of
https://github.com/plausible/analytics.git
synced 2024-09-11 18:07:33 +03:00
Redirect to People Settings after removing pending invitation (#3371)
This commit is contained in:
parent
51c1138d0d
commit
dbdbfb1144
@ -131,6 +131,6 @@ defmodule PlausibleWeb.InvitationController do
|
||||
|
||||
conn
|
||||
|> put_flash(:success, "You have removed the invitation for #{invitation.email}")
|
||||
|> redirect(to: Routes.site_path(conn, :settings_general, invitation.site.domain))
|
||||
|> redirect(to: Routes.site_path(conn, :settings_people, invitation.site.domain))
|
||||
end
|
||||
end
|
||||
|
@ -264,10 +264,13 @@ defmodule PlausibleWeb.Site.InvitationControllerTest do
|
||||
role: :admin
|
||||
)
|
||||
|
||||
delete(
|
||||
conn,
|
||||
Routes.invitation_path(conn, :remove_invitation, site.domain, invitation.invitation_id)
|
||||
)
|
||||
conn =
|
||||
delete(
|
||||
conn,
|
||||
Routes.invitation_path(conn, :remove_invitation, site.domain, invitation.invitation_id)
|
||||
)
|
||||
|
||||
assert redirected_to(conn, 302) == "/#{site.domain}/settings/people"
|
||||
|
||||
refute Repo.exists?(
|
||||
from i in Plausible.Auth.Invitation, where: i.email == "jane@example.com"
|
||||
|
Loading…
Reference in New Issue
Block a user