fix test
This commit is contained in:
parent
4beb3ce5c5
commit
9da4c88b49
|
@ -13,6 +13,9 @@ defmodule Pleroma.Pagination do
|
||||||
alias Pleroma.Repo
|
alias Pleroma.Repo
|
||||||
|
|
||||||
@default_limit 20
|
@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)
|
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"
|
@doc "GET /api/v1/favourites"
|
||||||
def favourites(%{assigns: %{user: user}} = conn, params) do
|
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
|
conn
|
||||||
|> add_link_headers(activities)
|
|> add_link_headers(activities)
|
||||||
|
|
Loading…
Reference in New Issue