Fix front-end, allow events to be created by a group, allow to get sessions from an event
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -37,6 +37,14 @@ defmodule Eventos.Groups do
|
||||
"""
|
||||
def get_group!(id), do: Repo.get!(Group, id)
|
||||
|
||||
@doc """
|
||||
Gets a single group, with all associations loaded.
|
||||
"""
|
||||
def get_group_full!(id) do
|
||||
group = Repo.get!(Group, id)
|
||||
Repo.preload(group, [:members, :organized_events])
|
||||
end
|
||||
|
||||
@doc """
|
||||
Creates a group.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user