pack routes change
[akkoma] / lib / pleroma / web / router.ex
index 6f591b12f5bf1a56de73477744e2fe8315012a62..707d5e1c4ec552a2c1a7e4e024ed8e17afbea150 100644 (file)
@@ -226,6 +226,20 @@ defmodule Pleroma.Web.Router do
   end
 
   scope "/api/pleroma/emoji", Pleroma.Web.PleromaAPI do
+    scope "/pack" do
+      pipe_through(:admin_api)
+
+      post("/", EmojiPackController, :create)
+      patch("/", EmojiPackController, :update)
+      delete("/", EmojiPackController, :delete)
+    end
+
+    scope "/pack" do
+      pipe_through(:api)
+
+      get("/", EmojiPackController, :show)
+    end
+
     # Modifying packs
     scope "/packs" do
       pipe_through(:admin_api)
@@ -246,8 +260,8 @@ defmodule Pleroma.Web.Router do
     # Pack info / downloading
     scope "/packs" do
       pipe_through(:api)
+
       get("/", EmojiPackController, :index)
-      get("/show", EmojiPackController, :show)
       get("/archive", EmojiPackController, :archive)
     end
   end