forked from AkkomaGang/akkoma
introduce max_id parameter in feed.atom (debug)
This commit is contained in:
parent
9c61f60558
commit
7124f12a94
1 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ def feed_redirect(conn, %{"nickname" => nickname}) do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def feed(conn, %{"nickname" => nickname}) do
|
def feed(conn, %{"nickname" => nickname} = params) do
|
||||||
user = User.get_cached_by_nickname(nickname)
|
user = User.get_cached_by_nickname(nickname)
|
||||||
query = from activity in Activity,
|
query = from activity in Activity,
|
||||||
where: fragment("?->>'actor' = ?", activity.data, ^user.ap_id),
|
where: fragment("?->>'actor' = ?", activity.data, ^user.ap_id),
|
||||||
|
@ -25,7 +25,7 @@ def feed(conn, %{"nickname" => nickname}) do
|
||||||
order_by: [desc: :id]
|
order_by: [desc: :id]
|
||||||
|
|
||||||
activities = query
|
activities = query
|
||||||
|> restrict_max(opts)
|
|> restrict_max(params)
|
||||||
|> Repo.all
|
|> Repo.all
|
||||||
|
|
||||||
response = user
|
response = user
|
||||||
|
|
Loading…
Reference in a new issue