Merge branch 'develop' into refactor/notification_settings
[akkoma] / lib / pleroma / web / pleroma_api / controllers / emoji_pack_controller.ex
index 5654b3fbe59f85e24d4849e431c1a5b6cb637215..33ecd1f70979ce27af7e335f58e8f8c0fe5ff647 100644 (file)
@@ -43,8 +43,8 @@ defmodule Pleroma.Web.PleromaAPI.EmojiPackController do
       |> Pleroma.Config.get!()
       |> Path.join("emoji")
 
-    with {:ok, packs} <- Pack.list_local(page: params.page, page_size: params.page_size) do
-      json(conn, packs)
+    with {:ok, packs, count} <- Pack.list_local(page: params.page, page_size: params.page_size) do
+      json(conn, %{packs: packs, count: count})
     else
       {:error, :create_dir, e} ->
         conn
@@ -60,10 +60,10 @@ defmodule Pleroma.Web.PleromaAPI.EmojiPackController do
     end
   end
 
-  def show(conn, %{name: name}) do
+  def show(conn, %{name: name, page: page, page_size: page_size}) do
     name = String.trim(name)
 
-    with {:ok, pack} <- Pack.show(name) do
+    with {:ok, pack} <- Pack.show(name: name, page: page, page_size: page_size) do
       json(conn, pack)
     else
       {:error, :not_found} ->