From fcd519e1a6996649dc19e33c6e33d7b62117c78e Mon Sep 17 00:00:00 2001 From: Rui Lopes Date: Mon, 9 Oct 2023 22:05:39 +0100 Subject: [PATCH] fix: lectures listing --- lib/bokken_web/views/lecture_view.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bokken_web/views/lecture_view.ex b/lib/bokken_web/views/lecture_view.ex index 3272568d..a7e5f9fb 100644 --- a/lib/bokken_web/views/lecture_view.ex +++ b/lib/bokken_web/views/lecture_view.ex @@ -2,7 +2,7 @@ defmodule BokkenWeb.LectureView do use BokkenWeb, :view alias BokkenWeb.EventView - alias BokkenWeb.FileView + alias BokkenWeb.FileJSON alias BokkenWeb.LectureView alias BokkenWeb.MentorView alias BokkenWeb.NinjaView @@ -72,7 +72,7 @@ defmodule BokkenWeb.LectureView do defp files(lecture) do if Ecto.assoc_loaded?(lecture.files) do - %{files: render_many(lecture.files, FileView, "file.json")} + %{files: for(file <- lecture.files, do: FileJSON.data(file))} else %{} end