projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
AccountController: Build the correct update activity.
[akkoma]
/
lib
/
pleroma
/
web
/
router.ex
diff --git
a/lib/pleroma/web/router.ex
b/lib/pleroma/web/router.ex
index 168edc6215774ae88c1e9981caa401f266b821f7..c6433cc5325f3e923dc9150632c82ec5945d7d5a 100644
(file)
--- a/
lib/pleroma/web/router.ex
+++ b/
lib/pleroma/web/router.ex
@@
-138,6
+138,7
@@
defmodule Pleroma.Web.Router do
patch("/users/:nickname/toggle_activation", AdminAPIController, :user_toggle_activation)
patch("/users/activate", AdminAPIController, :user_activate)
patch("/users/deactivate", AdminAPIController, :user_deactivate)
patch("/users/:nickname/toggle_activation", AdminAPIController, :user_toggle_activation)
patch("/users/activate", AdminAPIController, :user_activate)
patch("/users/deactivate", AdminAPIController, :user_deactivate)
+ patch("/users/approve", AdminAPIController, :user_approve)
put("/users/tag", AdminAPIController, :tag_users)
delete("/users/tag", AdminAPIController, :untag_users)
put("/users/tag", AdminAPIController, :tag_users)
delete("/users/tag", AdminAPIController, :untag_users)
@@
-160,9
+161,9
@@
defmodule Pleroma.Web.Router do
:right_delete_multiple
)
:right_delete_multiple
)
- get("/relay",
AdminAPIController, :relay_list
)
- post("/relay",
AdminAPIController, :relay_
follow)
- delete("/relay",
AdminAPIController, :relay_
unfollow)
+ get("/relay",
RelayController, :index
)
+ post("/relay",
RelayController, :
follow)
+ delete("/relay",
RelayController, :
unfollow)
post("/users/invite_token", InviteController, :create)
get("/users/invites", InviteController, :index)
post("/users/invite_token", InviteController, :create)
get("/users/invites", InviteController, :index)
@@
-209,6
+210,10
@@
defmodule Pleroma.Web.Router do
post("/oauth_app", OAuthAppController, :create)
patch("/oauth_app/:id", OAuthAppController, :update)
delete("/oauth_app/:id", OAuthAppController, :delete)
post("/oauth_app", OAuthAppController, :create)
patch("/oauth_app/:id", OAuthAppController, :update)
delete("/oauth_app/:id", OAuthAppController, :delete)
+
+ get("/media_proxy_caches", MediaProxyCacheController, :index)
+ post("/media_proxy_caches/delete", MediaProxyCacheController, :delete)
+ post("/media_proxy_caches/purge", MediaProxyCacheController, :purge)
end
scope "/api/pleroma/emoji", Pleroma.Web.PleromaAPI do
end
scope "/api/pleroma/emoji", Pleroma.Web.PleromaAPI do
@@
-324,10
+329,6
@@
defmodule Pleroma.Web.Router do
delete("/statuses/:id/reactions/:emoji", EmojiReactionController, :delete)
post("/notifications/read", NotificationController, :mark_as_read)
delete("/statuses/:id/reactions/:emoji", EmojiReactionController, :delete)
post("/notifications/read", NotificationController, :mark_as_read)
- patch("/accounts/update_avatar", AccountController, :update_avatar)
- patch("/accounts/update_banner", AccountController, :update_banner)
- patch("/accounts/update_background", AccountController, :update_background)
-
get("/mascot", MascotController, :show)
put("/mascot", MascotController, :update)
get("/mascot", MascotController, :show)
put("/mascot", MascotController, :update)
@@
-463,6
+464,7
@@
defmodule Pleroma.Web.Router do
scope "/api/web", Pleroma.Web do
pipe_through(:authenticated_api)
scope "/api/web", Pleroma.Web do
pipe_through(:authenticated_api)
+ # Backend-obscure settings blob for MastoFE, don't parse/reuse elsewhere
put("/settings", MastoFEController, :put_settings)
end
put("/settings", MastoFEController, :put_settings)
end
@@
-511,10
+513,6
@@
defmodule Pleroma.Web.Router do
scope "/api", Pleroma.Web do
pipe_through(:config)
scope "/api", Pleroma.Web do
pipe_through(:config)
- get("/help/test", TwitterAPI.UtilController, :help_test)
- post("/help/test", TwitterAPI.UtilController, :help_test)
- get("/statusnet/config", TwitterAPI.UtilController, :config)
- get("/statusnet/version", TwitterAPI.UtilController, :version)
get("/pleroma/frontend_configurations", TwitterAPI.UtilController, :frontend_configurations)
end
get("/pleroma/frontend_configurations", TwitterAPI.UtilController, :frontend_configurations)
end
@@
-580,13
+578,6
@@
defmodule Pleroma.Web.Router do
get("/mailer/unsubscribe/:token", Mailer.SubscriptionController, :unsubscribe)
end
get("/mailer/unsubscribe/:token", Mailer.SubscriptionController, :unsubscribe)
end
- scope "/", Pleroma.Web.ActivityPub do
- # XXX: not really ostatus
- pipe_through(:ostatus)
-
- get("/users/:nickname/outbox", ActivityPubController, :outbox)
- end
-
pipeline :ap_service_actor do
plug(:accepts, ["activity+json", "json"])
end
pipeline :ap_service_actor do
plug(:accepts, ["activity+json", "json"])
end
@@
-611,6
+602,7
@@
defmodule Pleroma.Web.Router do
get("/api/ap/whoami", ActivityPubController, :whoami)
get("/users/:nickname/inbox", ActivityPubController, :read_inbox)
get("/api/ap/whoami", ActivityPubController, :whoami)
get("/users/:nickname/inbox", ActivityPubController, :read_inbox)
+ get("/users/:nickname/outbox", ActivityPubController, :outbox)
post("/users/:nickname/outbox", ActivityPubController, :update_outbox)
post("/api/ap/upload_media", ActivityPubController, :upload_media)
post("/users/:nickname/outbox", ActivityPubController, :update_outbox)
post("/api/ap/upload_media", ActivityPubController, :upload_media)
@@
-727,7
+719,7
@@
defmodule Pleroma.Web.Router do
get("/registration/:token", RedirectController, :registration_page)
get("/:maybe_nickname_or_id", RedirectController, :redirector_with_meta)
get("/api*path", RedirectController, :api_not_implemented)
get("/registration/:token", RedirectController, :registration_page)
get("/:maybe_nickname_or_id", RedirectController, :redirector_with_meta)
get("/api*path", RedirectController, :api_not_implemented)
- get("/*path", RedirectController, :redirector)
+ get("/*path", RedirectController, :redirector
_with_preload
)
options("/*path", RedirectController, :empty)
end
options("/*path", RedirectController, :empty)
end