Add GET endpoints for remote subscription forms

There are two reasons for adding a GET endpoint:

0: Barely displaying the form does not change anything on the server.

1: It makes frontend development easier as they can now use a link,
instead of a form, to allow remote users to interact with local ones.
This commit is contained in:
Tusooa Zhu 2021-12-28 16:41:46 -05:00
commit 779457d9a4
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
4 changed files with 55 additions and 4 deletions

View file

@ -337,6 +337,7 @@ defmodule Pleroma.Web.Router do
pipe_through(:pleroma_html)
post("/main/ostatus", UtilController, :remote_subscribe)
get("/main/ostatus", UtilController, :show_subscribe_form)
get("/ostatus_subscribe", RemoteFollowController, :follow)
post("/ostatus_subscribe", RemoteFollowController, :do_follow)
end