fix confusing func names

This commit is contained in:
Silas 2023-11-24 20:29:05 -05:00
parent 1ec5459a79
commit 5962f9eaee
Signed by: silentsilas
GPG Key ID: 4199EFB7DAA34349
2 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@ defmodule Poex.Pads.DocumentDynamicSupervisor do
DynamicSupervisor.start_link(__MODULE__, init_arg, name: __MODULE__) DynamicSupervisor.start_link(__MODULE__, init_arg, name: __MODULE__)
end end
def start_document_supervisor(args) do def start_document_server(args) do
spec = {DocumentServer, args} spec = {DocumentServer, args}
DynamicSupervisor.start_child(__MODULE__, spec) DynamicSupervisor.start_child(__MODULE__, spec)
end end

View File

@ -11,7 +11,7 @@ defmodule PoexWeb.PadLive do
Document.changeset(%Document{}, %{title: "Untitled"}) Document.changeset(%Document{}, %{title: "Untitled"})
|> Repo.insert() |> Repo.insert()
DocumentDynamicSupervisor.start_document_supervisor(new_document) DocumentDynamicSupervisor.start_document_server(new_document)
# Redirect to the new document with its ID # Redirect to the new document with its ID
{:ok, push_navigate(socket, to: ~p"/pad/#{new_document.id}", replace: true)} {:ok, push_navigate(socket, to: ~p"/pad/#{new_document.id}", replace: true)}
@ -24,7 +24,7 @@ defmodule PoexWeb.PadLive do
contents: contents contents: contents
} = document = Repo.get!(Document, id) } = document = Repo.get!(Document, id)
DocumentDynamicSupervisor.start_document_supervisor(document) DocumentDynamicSupervisor.start_document_server(document)
# init editor and assigns with latest state from doc # init editor and assigns with latest state from doc
{:ok, assign(socket, id: id, title: title, contents: contents |> Utils.atomize_keys())} {:ok, assign(socket, id: id, title: title, contents: contents |> Utils.atomize_keys())}