From 6066a44ae8cb704a9314c8cc5715cf5e3b1eff2a Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 26 Jul 2021 17:22:19 +0200 Subject: [PATCH] Change `can_be_managed_by/2` to `can_be_managed_by?/2` Signed-off-by: Thomas Citharel --- lib/mobilizon/events/event.ex | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/mobilizon/events/event.ex b/lib/mobilizon/events/event.ex index e86d0bc5..f2be4f46 100644 --- a/lib/mobilizon/events/event.ex +++ b/lib/mobilizon/events/event.ex @@ -188,13 +188,11 @@ defmodule Mobilizon.Events.Event do @doc """ Checks whether an event can be managed. """ - @spec can_be_managed_by(t, integer | String.t()) :: boolean - def can_be_managed_by(%__MODULE__{organizer_actor_id: organizer_actor_id}, actor_id) - when organizer_actor_id == actor_id do - {:event_can_be_managed, true} - end + @spec can_be_managed_by?(t, integer | String.t()) :: boolean + def can_be_managed_by?(%__MODULE__{organizer_actor_id: organizer_actor_id}, actor_id), + do: organizer_actor_id == actor_id - def can_be_managed_by(_event, _actor), do: {:event_can_be_managed, false} + def can_be_managed_by?(_event, _actor), do: false @spec put_tags(Changeset.t(), map) :: Changeset.t() defp put_tags(%Changeset{} = changeset, %{tags: tags}) do