summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMark Felder <feld@feld.me>2024-05-08 01:44:58 +0000
committerMark Felder <feld@feld.me>2024-05-08 01:44:58 +0000
commit19002fd6c11760898daf0b5ed648d6ba58d84b97 (patch)
tree731bf286c970382de6ce2f1dde2047cf05940ebb /lib
parent37de58823f8c7ec45921ea16fc7b5a2e25d27ad1 (diff)
downloadpleroma-19002fd6c11760898daf0b5ed648d6ba58d84b97.tar.gz
pleroma-19002fd6c11760898daf0b5ed648d6ba58d84b97.zip
Mastodon API: Remove deprecated GET /api/v1/statuses/:id/card endpoint
Removed back in 2019 https://github.com/mastodon/mastodon/pull/11213
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/mastodon_api/controllers/status_controller.ex17
-rw-r--r--lib/pleroma/web/router.ex1
2 files changed, 0 insertions, 18 deletions
diff --git a/lib/pleroma/web/mastodon_api/controllers/status_controller.ex b/lib/pleroma/web/mastodon_api/controllers/status_controller.ex
index b7dc00a44..83e1bee54 100644
--- a/lib/pleroma/web/mastodon_api/controllers/status_controller.ex
+++ b/lib/pleroma/web/mastodon_api/controllers/status_controller.ex
@@ -25,7 +25,6 @@ defmodule Pleroma.Web.MastodonAPI.StatusController do
alias Pleroma.Web.OAuth.Token
alias Pleroma.Web.Plugs.OAuthScopesPlug
alias Pleroma.Web.Plugs.RateLimiter
- alias Pleroma.Web.RichMedia.Card
plug(Pleroma.Web.ApiSpec.CastAndValidate, replace_params: false)
@@ -39,7 +38,6 @@ defmodule Pleroma.Web.MastodonAPI.StatusController do
when action in [
:index,
:show,
- :card,
:context,
:show_history,
:show_source
@@ -474,21 +472,6 @@ defmodule Pleroma.Web.MastodonAPI.StatusController do
end
end
- @doc "GET /api/v1/statuses/:id/card"
- @deprecated "https://github.com/tootsuite/mastodon/pull/11213"
- def card(
- %{assigns: %{user: user}, private: %{open_api_spex: %{params: %{id: status_id}}}} = conn,
- _
- ) do
- with %Activity{} = activity <- Activity.get_by_id(status_id),
- true <- Visibility.visible_for_user?(activity, user),
- %Card{} = card_data <- Card.get_by_activity(activity) do
- render(conn, "card.json", card_data)
- else
- _ -> render_error(conn, :not_found, "Record not found")
- end
- end
-
@doc "GET /api/v1/statuses/:id/favourited_by"
def favourited_by(
%{assigns: %{user: user}, private: %{open_api_spex: %{params: %{id: id}}}} = conn,
diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex
index 4fe0cb02f..86d6da883 100644
--- a/lib/pleroma/web/router.ex
+++ b/lib/pleroma/web/router.ex
@@ -768,7 +768,6 @@ defmodule Pleroma.Web.Router do
get("/statuses", StatusController, :index)
get("/statuses/:id", StatusController, :show)
get("/statuses/:id/context", StatusController, :context)
- get("/statuses/:id/card", StatusController, :card)
get("/statuses/:id/favourited_by", StatusController, :favourited_by)
get("/statuses/:id/reblogged_by", StatusController, :reblogged_by)
get("/statuses/:id/history", StatusController, :show_history)