Skip to content

Commit

Permalink
still needed? forgotten to commit
Browse files Browse the repository at this point in the history
  • Loading branch information
electronicbites committed Dec 22, 2024
1 parent f9ebdd6 commit 7439795
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions lib/radiator/episode_outliner.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
defmodule Radiator.EpisodeOutliner do
alias Radiator.Outline.NodeRepository
# alias Radiator.Outline
alias Radiator.Podcast
alias Radiator.Podcast.Episode

@doc """
Returns a list of all child nodes.
"""
def list_nodes_by_episode_sorted(episode_id) do
%Episode{outline_node_container: outline_node_container} = Podcast.get_episode!(episode_id)

outline_node_container
|> NodeRepository.list_nodes_by_node_container()
end

def insert_node(%{"episode_id" => episode_id} = attrs) do
%Episode{outline_node_container: outline_node_container} = Podcast.get_episode!(episode_id)

attrs
|> Map.put("outline_node_container", outline_node_container)
|> insert_node()
end
end

0 comments on commit 7439795

Please sign in to comment.