Fix tests

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2018-11-12 23:36:51 +01:00
parent bdc16bad6b
commit e32ce85f0f
2 changed files with 5 additions and 5 deletions

View File

@ -64,8 +64,8 @@ defmodule MobilizonWeb.Resolvers.Event do
end end
def create_event(_parent, args, %{context: %{current_user: user}}) do def create_event(_parent, args, %{context: %{current_user: user}}) do
organizer_actor_id = Map.get(args, "organizer_actor_id") || Actors.get_actor_for_user(user).id organizer_actor_id = Map.get(args, :organizer_actor_id) || Actors.get_actor_for_user(user).id
args = args |> Map.put("organizer_actor_id", organizer_actor_id) args = args |> Map.put(:organizer_actor_id, organizer_actor_id)
Mobilizon.Events.create_event(args) Mobilizon.Events.create_event(args)
end end

View File

@ -1,15 +1,15 @@
defmodule Mobilizon.Repo.Migrations.AlterEventTimestampsToDateTimeWithTimeZone do defmodule Mobilizon.Repo.Migrations.RevertAlterEventTimestampsToDateTimeWithTimeZone do
use Ecto.Migration use Ecto.Migration
def up do def up do
alter table("events") do alter table(:events) do
modify :inserted_at, :timestamptz modify :inserted_at, :timestamptz
modify :updated_at, :timestamptz modify :updated_at, :timestamptz
end end
end end
def down do def down do
alter table("events") do alter table(:events) do
modify :inserted_at, :utc_datetime modify :inserted_at, :utc_datetime
modify :updated_at, :utc_datetime modify :updated_at, :utc_datetime
end end