Fix relay outbox endpoint

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-08-31 17:26:08 +02:00
parent aa7d919c98
commit c011a988a8
4 changed files with 34 additions and 3 deletions

View File

@@ -375,6 +375,16 @@ defmodule Mobilizon.Events do
|> Repo.stream()
end
@spec list_public_local_events(integer | nil, integer | nil) :: Page.t()
def list_public_local_events(page \\ nil, limit \\ nil) do
Event
|> filter_public_visibility()
|> filter_draft()
|> filter_local()
|> preload_for_event()
|> Page.build_page(page, limit)
end
@doc """
Returns the list of events with the same tags.
"""