update things
This commit is contained in:
parent
984a193c5d
commit
b2f2f57029
6 changed files with 27 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue