Fix tests
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
9c510117f8
commit
4bdfda5ef7
@ -64,8 +64,8 @@ defmodule MobilizonWeb.Resolvers.Event do
|
||||
end
|
||||
|
||||
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
|
||||
args = args |> Map.put("organizer_actor_id", organizer_actor_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)
|
||||
Mobilizon.Events.create_event(args)
|
||||
end
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
defmodule Mobilizon.Repo.Migrations.AlterEventTimestampsToDateTimeWithTimeZone do
|
||||
defmodule Mobilizon.Repo.Migrations.RevertAlterEventTimestampsToDateTimeWithTimeZone do
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
alter table("events") do
|
||||
alter table(:events) do
|
||||
modify :inserted_at, :timestamptz
|
||||
modify :updated_at, :timestamptz
|
||||
end
|
||||
end
|
||||
|
||||
def down do
|
||||
alter table("events") do
|
||||
alter table(:events) do
|
||||
modify :inserted_at, :utc_datetime
|
||||
modify :updated_at, :utc_datetime
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user