Refactor checking permissions when managing events and tests

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-07-26 17:23:42 +02:00
parent 52fe274c5a
commit acd921432f
3 changed files with 539 additions and 343 deletions

View File

@@ -153,6 +153,7 @@ defmodule Mobilizon.Events do
def get_event_by_url!(url) do
url
|> event_by_url_query()
|> preload_for_event()
|> Repo.one!()
end