Skip to content

Commit

Permalink
fix: lectures listing (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruilopesm authored Oct 9, 2023
1 parent 89ca96a commit a3ee731
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/bokken_web/views/lecture_view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a3ee731

Please sign in to comment.