Skip to content

Commit

Permalink
fix: change view functions to NinjaJSON.data
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsp45 committed Jan 11, 2024
1 parent 52510f8 commit 4e102a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/bokken_web/views/enrollment_view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ defmodule BokkenWeb.EnrollmentView do

defp ninja(enrollment, current_user) do
if Ecto.assoc_loaded?(enrollment.ninja) do
%{ninja: NinjaJSON.show(%{ninja: enrollment.ninja, current_user: current_user})}
%{ninja: NinjaJSON.data(enrollment.ninja, current_user)}
else
%{ninja_id: enrollment.ninja_id}
end
Expand Down
2 changes: 1 addition & 1 deletion lib/bokken_web/views/lecture_view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ defmodule BokkenWeb.LectureView do

defp ninja(lecture, current_user) do
if Ecto.assoc_loaded?(lecture.ninja) do
%{ninja: NinjaJSON.show(%{ninja: lecture.ninja, current_user: current_user})}
%{ninja: NinjaJSON.data(lecture.ninja, current_user)}
else
%{ninja_id: lecture.ninja_id}
end
Expand Down

0 comments on commit 4e102a1

Please sign in to comment.