Remove Object.get_by_id_and_maybe_refetch/2
This was only used for poll refreshing and is not a good approach to the problem.
This commit is contained in:
parent
d2eb4992e2
commit
382426e033
3 changed files with 1 additions and 166 deletions
|
|
@ -30,7 +30,7 @@ defmodule Pleroma.Web.MastodonAPI.PollController do
|
|||
|
||||
@doc "GET /api/v1/polls/:id"
|
||||
def show(%{assigns: %{user: user}, private: %{open_api_spex: %{params: %{id: id}}}} = conn, _) do
|
||||
with %Object{} = object <- Object.get_by_id_and_maybe_refetch(id, interval: 60),
|
||||
with %Object{} = object <- Object.get_by_id(id),
|
||||
%Activity{} = activity <- Activity.get_create_by_object_ap_id(object.data["id"]),
|
||||
true <- Visibility.visible_for_user?(activity, user) do
|
||||
try_render(conn, "show.json", %{object: object, for: user})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue