Correctly handle event update

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-09-04 18:24:31 +02:00
parent 6845825db2
commit f5c3dbf128
27 changed files with 493 additions and 161 deletions

View File

@@ -229,14 +229,14 @@ defmodule MobilizonWeb.Schema.EventType do
arg(:organizer_actor_id, non_null(:id))
arg(:category, :string, default_value: "meeting")
arg(:physical_address, :address_input)
arg(:options, :event_options_input, default_value: %{})
arg(:options, :event_options_input)
resolve(&Event.create_event/3)
end
@desc "Update an event"
field :update_event, type: :event do
arg(:event_id, non_null(:integer))
arg(:event_id, non_null(:id))
arg(:title, :string)
arg(:description, :string)
@@ -246,6 +246,7 @@ defmodule MobilizonWeb.Schema.EventType do
arg(:status, :integer)
arg(:public, :boolean)
arg(:visibility, :event_visibility)
arg(:organizer_actor_id, :id)
arg(:tags, list_of(:string), description: "The list of tags associated to the event")
@@ -259,6 +260,7 @@ defmodule MobilizonWeb.Schema.EventType do
arg(:phone_address, :string)
arg(:category, :string)
arg(:physical_address, :address_input)
arg(:options, :event_options_input)
resolve(&Event.update_event/3)
end