update things

This commit is contained in:
zack 2024-10-26 22:38:41 -04:00
parent 984a193c5d
commit b2f2f57029
No known key found for this signature in database
GPG key ID: 5F873416BCF59F35
6 changed files with 27 additions and 9 deletions

View file

@ -88,7 +88,7 @@ defmodule ZoeyscomputerWeb.GistLive.FormComponent do
end
defp save_gist(socket, :new, gist_params) do
case Gists.create_gist(gist_params) do
case Gists.create_gist(socket.assigns.current_user, gist_params) do
{:ok, gist} ->
notify_parent({:saved, gist})
@ -98,6 +98,7 @@ defmodule ZoeyscomputerWeb.GistLive.FormComponent do
|> push_patch(to: socket.assigns.patch)}
{:error, %Ecto.Changeset{} = changeset} ->
IO.inspect(changeset)
{:noreply, assign(socket, form: to_form(changeset))}
end
end