X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Frouter.ex;h=3239249f913bbb3cd5a9bf79ccfe8a68fc77717e;hb=d903e34cacd18157a2a60e7b112eb05af2766266;hp=a076073665d765aaa67c48751c254b244489ddef;hpb=6ed5044c4e1889a51a1dc6015b602759b83fc3b7;p=akkoma diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex index a07607366..3239249f9 100644 --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@ -1,8 +1,6 @@ defmodule Pleroma.Web.Router do use Pleroma.Web, :router - alias Pleroma.{Repo, User, Web.Router} - pipeline :api do plug(:accepts, ["json"]) plug(:fetch_session) @@ -200,6 +198,11 @@ defmodule Pleroma.Web.Router do put("/filters/:id", MastodonAPIController, :update_filter) delete("/filters/:id", MastodonAPIController, :delete_filter) + post("/push/subscription", MastodonAPIController, :create_push_subscription) + get("/push/subscription", MastodonAPIController, :get_push_subscription) + put("/push/subscription", MastodonAPIController, :update_push_subscription) + delete("/push/subscription", MastodonAPIController, :delete_push_subscription) + get("/suggestions", MastodonAPIController, :suggestions) get("/endorsements", MastodonAPIController, :empty_array) @@ -351,6 +354,10 @@ defmodule Pleroma.Web.Router do plug(:accepts, ["xml", "atom", "html", "activity+json"]) end + pipeline :oembed do + plug(:accepts, ["json", "xml"]) + end + scope "/", Pleroma.Web do pipe_through(:ostatus) @@ -366,6 +373,12 @@ defmodule Pleroma.Web.Router do post("/push/subscriptions/:id", Websub.WebsubController, :websub_incoming) end + scope "/", Pleroma.Web do + pipe_through(:oembed) + + get("/oembed", OEmbed.OEmbedController, :url) + end + pipeline :activitypub do plug(:accepts, ["activity+json"]) plug(Pleroma.Web.Plugs.HTTPSignaturePlug)