forked from YokaiRick/akkoma
fix test
This commit is contained in:
parent
4beb3ce5c5
commit
9da4c88b49
2 changed files with 9 additions and 1 deletions
|
@ -13,6 +13,9 @@ defmodule Pleroma.Pagination do
|
|||
alias Pleroma.Repo
|
||||
|
||||
@default_limit 20
|
||||
@page_keys ["max_id", "min_id", "limit", "since_id", "order"]
|
||||
|
||||
def page_keys, do: @page_keys
|
||||
|
||||
def fetch_paginated(query, params, type \\ :keyset)
|
||||
|
||||
|
|
|
@ -346,7 +346,12 @@ def context(%{assigns: %{user: user}} = conn, %{"id" => id}) do
|
|||
|
||||
@doc "GET /api/v1/favourites"
|
||||
def favourites(%{assigns: %{user: user}} = conn, params) do
|
||||
activities = ActivityPub.fetch_favourites([], user, Map.take(params, ["limit"]))
|
||||
activities =
|
||||
ActivityPub.fetch_favourites(
|
||||
[],
|
||||
user,
|
||||
Map.take(params, Pleroma.Pagination.page_keys())
|
||||
)
|
||||
|
||||
conn
|
||||
|> add_link_headers(activities)
|
||||
|
|
Loading…
Reference in a new issue