Refactoring of Events context

This commit is contained in:
miffigriffi
2019-09-16 02:07:44 +02:00
parent 6372599493
commit ac77a7d28a
18 changed files with 910 additions and 1158 deletions

View File

@@ -17,12 +17,12 @@ defmodule MobilizonWeb.PageController do
end
def event(conn, %{"uuid" => uuid}) do
{status, event} = Events.get_cached_event_full_by_uuid(uuid)
{status, event} = Events.get_cached_public_event_by_uuid_with_preload(uuid)
render_or_error(conn, &ok_status_and_is_visible?/2, status, :event, event)
end
def comment(conn, %{"uuid" => uuid}) do
{status, comment} = Events.get_cached_comment_full_by_uuid(uuid)
{status, comment} = Events.get_cached_comment_by_uuid_with_preload(uuid)
render_or_error(conn, &ok_status_and_is_visible?/2, status, :comment, comment)
end