From c678a14c914f3ae8ccd08cef90b6c34c0f2f9318 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Wo=CC=88ginger?= Date: Tue, 9 Jan 2024 19:46:57 +0100 Subject: [PATCH] adapt seeds after connecting nodes to episodes --- priv/repo/seeds.exs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/priv/repo/seeds.exs b/priv/repo/seeds.exs index 5936a282..0e41d3d4 100644 --- a/priv/repo/seeds.exs +++ b/priv/repo/seeds.exs @@ -10,12 +10,6 @@ alias Radiator.{Accounts, Outline, Podcast} {:ok, _user_jim} = Accounts.register_user(%{email: "jim@radiator.de", password: "supersupersecret"}) -{:ok, _node} = - Outline.create_node(%{content: "This is my first node"}) - -{:ok, _node} = - Outline.create_node(%{content: "Second node"}) - {:ok, network} = Podcast.create_network(%{title: "Podcast network"}) @@ -28,5 +22,11 @@ alias Radiator.{Accounts, Outline, Podcast} {:ok, _episode} = Podcast.create_episode(%{title: "past episode", show_id: show.id}) -{:ok, _episode} = +{:ok, current_episode} = Podcast.create_episode(%{title: "current episode", show_id: show.id}) + +{:ok, _node} = + Outline.create_node(%{content: "This is my first node", episode_id: current_episode.id}) + +{:ok, _node} = + Outline.create_node(%{content: "Second node", episode_id: current_episode.id})