redirect to profile path upon user edit instead

This commit is contained in:
Luna D 2020-09-12 17:17:32 +02:00 committed by byte[]
parent 45402bd44f
commit c806b08f0f

View file

@ -62,7 +62,7 @@ defmodule PhilomenaWeb.Admin.UserController do
{:ok, _user} ->
conn
|> put_flash(:info, "User successfully updated.")
|> redirect(to: Routes.admin_user_path(conn, :index))
|> redirect(to: Routes.profile_path(conn, :show, conn.assigns.user))
{:error, %{user: changeset}} ->
render(conn, "edit.html", changeset: changeset)