From 5962f9eaee1329e207a92add53f24a783faabe57 Mon Sep 17 00:00:00 2001 From: Silas Date: Fri, 24 Nov 2023 20:29:05 -0500 Subject: [PATCH] fix confusing func names --- lib/poex/pads/document_supervisor.ex | 2 +- lib/poex_web/live/pad/pad_live.ex | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/poex/pads/document_supervisor.ex b/lib/poex/pads/document_supervisor.ex index 57bdb7d..42dc8d2 100644 --- a/lib/poex/pads/document_supervisor.ex +++ b/lib/poex/pads/document_supervisor.ex @@ -6,7 +6,7 @@ defmodule Poex.Pads.DocumentDynamicSupervisor do DynamicSupervisor.start_link(__MODULE__, init_arg, name: __MODULE__) end - def start_document_supervisor(args) do + def start_document_server(args) do spec = {DocumentServer, args} DynamicSupervisor.start_child(__MODULE__, spec) end diff --git a/lib/poex_web/live/pad/pad_live.ex b/lib/poex_web/live/pad/pad_live.ex index 0c70de4..8279ff2 100644 --- a/lib/poex_web/live/pad/pad_live.ex +++ b/lib/poex_web/live/pad/pad_live.ex @@ -11,7 +11,7 @@ defmodule PoexWeb.PadLive do Document.changeset(%Document{}, %{title: "Untitled"}) |> Repo.insert() - DocumentDynamicSupervisor.start_document_supervisor(new_document) + DocumentDynamicSupervisor.start_document_server(new_document) # Redirect to the new document with its ID {:ok, push_navigate(socket, to: ~p"/pad/#{new_document.id}", replace: true)} @@ -24,7 +24,7 @@ defmodule PoexWeb.PadLive do contents: contents } = document = Repo.get!(Document, id) - DocumentDynamicSupervisor.start_document_supervisor(document) + DocumentDynamicSupervisor.start_document_server(document) # init editor and assigns with latest state from doc {:ok, assign(socket, id: id, title: title, contents: contents |> Utils.atomize_keys())}