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:
Thomas Citharel
2018-01-16 19:45:09 +01:00
parent 7a98674e59
commit 67ef32432e
29 changed files with 278 additions and 82 deletions

View File

@@ -15,13 +15,15 @@ defmodule Eventos.Repo.Migrations.CreateEvents do
add :large_image, :string
add :thumbnail, :string
add :publish_at, :datetimetz
add :organizer_id, references(:accounts, on_delete: :nothing), null: false
add :organizer_account_id, references(:accounts, on_delete: :nothing)
add :organizer_group_id, references(:groups, on_delete: :nothing)
add :category_id, references(:categories, on_delete: :nothing), null: false
timestamps()
end
create index(:events, [:organizer_id])
create index(:events, [:organizer_account_id])
create index(:events, [:organizer_group_id])
create unique_index(:events, [:slug])
end

View File

@@ -9,7 +9,6 @@
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as they will fail if something goes wrong.
import Logger
Eventos.Repo.delete_all Eventos.Accounts.User