Add spec for AccountController.lists
[akkoma] / lib / pleroma / web / mastodon_api / controllers / account_controller.ex
index 1ffccdd1da71ac187def2cdb3653faffbe45d2fb..2c5cd8cdec3a110ee3226cf8f5e20dc2b2f46849 100644 (file)
@@ -90,7 +90,9 @@ defmodule Pleroma.Web.MastodonAPI.AccountController do
            :relationships,
            :show,
            :statuses,
-           :followers
+           :followers,
+           :following,
+           :lists
          ]
   )
 
@@ -304,6 +306,11 @@ defmodule Pleroma.Web.MastodonAPI.AccountController do
 
   @doc "GET /api/v1/accounts/:id/following"
   def following(%{assigns: %{user: for_user, account: user}} = conn, params) do
+    params =
+      params
+      |> Enum.map(fn {key, value} -> {to_string(key), value} end)
+      |> Enum.into(%{})
+
     followers =
       cond do
         for_user && user.id == for_user.id -> MastodonAPI.get_friends(user, params)