X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Frouter.ex;h=980242c687f030904cae5ab5203b02a9b936182a;hb=80bc8c2cc980b5e3270110313514a5bad2d3c9fb;hp=9654ab8a3fe7402c358edc8654bffb9a7c6c487b;hpb=12b28c8925c2c55e0d7bb66ff3320532a1aade3b;p=akkoma
diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex
index 9654ab8a3..980242c68 100644
--- a/lib/pleroma/web/router.ex
+++ b/lib/pleroma/web/router.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Router do
@@ -192,15 +192,17 @@ defmodule Pleroma.Web.Router do
put("/statuses/:id", AdminAPIController, :status_update)
delete("/statuses/:id", AdminAPIController, :status_delete)
+ get("/statuses", AdminAPIController, :list_statuses)
get("/config", AdminAPIController, :config_show)
post("/config", AdminAPIController, :config_update)
- get("/config/migrate_to_db", AdminAPIController, :migrate_to_db)
- get("/config/migrate_from_db", AdminAPIController, :migrate_from_db)
+ get("/config/descriptions", AdminAPIController, :config_descriptions)
+ get("/restart", AdminAPIController, :restart)
get("/moderation_log", AdminAPIController, :list_log)
post("/reload_emoji", AdminAPIController, :reload_emoji)
+ get("/stats", AdminAPIController, :stats)
end
scope "/api/pleroma/emoji", Pleroma.Web.PleromaAPI do
@@ -271,7 +273,8 @@ defmodule Pleroma.Web.Router do
scope "/api/v1/pleroma", Pleroma.Web.PleromaAPI do
pipe_through(:api)
- get("/statuses/:id/emoji_reactions_by", PleromaAPIController, :emoji_reactions_by)
+ get("/statuses/:id/reactions/:emoji", PleromaAPIController, :emoji_reactions_by)
+ get("/statuses/:id/reactions", PleromaAPIController, :emoji_reactions_by)
end
scope "/api/v1/pleroma", Pleroma.Web.PleromaAPI do
@@ -287,8 +290,8 @@ defmodule Pleroma.Web.Router do
pipe_through(:authenticated_api)
patch("/conversations/:id", PleromaAPIController, :update_conversation)
- post("/statuses/:id/react_with_emoji", PleromaAPIController, :react_with_emoji)
- post("/statuses/:id/unreact_with_emoji", PleromaAPIController, :unreact_with_emoji)
+ put("/statuses/:id/reactions/:emoji", PleromaAPIController, :react_with_emoji)
+ delete("/statuses/:id/reactions/:emoji", PleromaAPIController, :unreact_with_emoji)
post("/notifications/read", PleromaAPIController, :read_notification)
patch("/accounts/update_avatar", AccountController, :update_avatar)
@@ -527,8 +530,10 @@ defmodule Pleroma.Web.Router do
get("/notice/:id", OStatus.OStatusController, :notice)
get("/notice/:id/embed_player", OStatus.OStatusController, :notice_player)
- get("/users/:nickname/feed", Feed.FeedController, :feed)
- get("/users/:nickname", Feed.FeedController, :feed_redirect)
+ get("/users/:nickname/feed", Feed.UserController, :feed, as: :user_feed)
+ get("/users/:nickname", Feed.UserController, :feed_redirect, as: :user_feed)
+
+ get("/tags/:tag", Feed.TagController, :feed, as: :tag_feed)
end
scope "/", Pleroma.Web do