Add link headers to MastoAPI /favourites
authorSadposter <hannah+pleroma@coffee-and-dreams.uk>
Sat, 12 Jan 2019 14:03:35 +0000 (14:03 +0000)
committerSadposter <hannah+pleroma@coffee-and-dreams.uk>
Sat, 12 Jan 2019 14:03:35 +0000 (14:03 +0000)
As documented at https://docs.joinmastodon.org/api/rest/favourites/

lib/pleroma/web/mastodon_api/mastodon_api_controller.ex

index e00a3fb8721849d8eaa302aed7ee23b3ff7f50b8..b83539bad62165a7d2a181bcd3086459db8f9052 100644 (file)
@@ -836,6 +836,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
       |> Enum.reverse()
 
     conn
       |> Enum.reverse()
 
     conn
+    |> add_link_headers(:favourites, activities)
     |> put_view(StatusView)
     |> render("index.json", %{activities: activities, for: user, as: :activity})
   end
     |> put_view(StatusView)
     |> render("index.json", %{activities: activities, for: user, as: :activity})
   end