Attempt to filter out API calls from FrontendStatic plug
[akkoma] / lib / pleroma / web / router.ex
index 297f03fbd1ba7b56966e95962036069abfc28254..d71011033cbf8b6e0f6616fc12d4d2c571f1cc47 100644 (file)
@@ -420,6 +420,13 @@ defmodule Pleroma.Web.Router do
     get("/federation_status", InstancesController, :show)
   end
 
+  scope "/api/v2/pleroma", Pleroma.Web.PleromaAPI do
+    scope [] do
+      pipe_through(:authenticated_api)
+      get("/chats", ChatController, :index2)
+    end
+  end
+
   scope "/api/v1", Pleroma.Web.MastodonAPI do
     pipe_through(:authenticated_api)
 
@@ -443,6 +450,7 @@ defmodule Pleroma.Web.Router do
 
     get("/conversations", ConversationController, :index)
     post("/conversations/:id/read", ConversationController, :mark_as_read)
+    delete("/conversations/:id", ConversationController, :delete)
 
     get("/domain_blocks", DomainBlockController, :index)
     post("/domain_blocks", DomainBlockController, :create)