[Pleroma.Web.MastodonApi.MastodonApiController] Add /api/v2/search
[akkoma] / lib / pleroma / web / router.ex
index 1c1c26c563b695a207e7a90c47270945b58b17d6..ebe68218b3992e4b8d18cf24d61ba67c22b92445 100644 (file)
@@ -41,7 +41,7 @@ defmodule Pleroma.Web.Router do
   end
 
   pipeline :well_known do
-    plug(:accepts, ["json", "jrd+json", "xml", "xml+xrd"])
+    plug(:accepts, ["json", "jrd+json", "xml", "xrd+xml"])
   end
 
   pipeline :config do
@@ -170,9 +170,16 @@ defmodule Pleroma.Web.Router do
     get("/accounts/:id/following", MastodonAPIController, :following)
     get("/accounts/:id", MastodonAPIController, :user)
 
+    get("/trends", MastodonAPIController, :empty_array)
+
     get("/search", MastodonAPIController, :search)
   end
 
+  scope "/api/v2", Pleroma.Web.MastodonAPI do
+    pipe_through(:api)
+    get("/search", MastodonAPIController, :search2)
+  end
+
   scope "/api", Pleroma.Web do
     pipe_through(:config)