diff options
author | Mark Felder <feld@feld.me> | 2024-01-28 17:39:46 -0500 |
---|---|---|
committer | Mark Felder <feld@feld.me> | 2024-01-28 17:41:07 -0500 |
commit | 6a22a80f9f86dade9976e0f3363b4415edd933d0 (patch) | |
tree | a59030d29f4f370900256ff52645d2217f112afa | |
parent | e53c20b03c934c725726f49b2ca98b0bd9406bef (diff) | |
download | pleroma-6a22a80f9f86dade9976e0f3363b4415edd933d0.tar.gz pleroma-6a22a80f9f86dade9976e0f3363b4415edd933d0.zip |
Pleroma.Web.MastodonAPI.DirectoryController: dialyzer errors
lib/pleroma/web/mastodon_api/controllers/directory_controller.ex:6:unused_fun
Function skip_auth/2 will never be called.
________________________________________________________________________________
lib/pleroma/web/mastodon_api/controllers/directory_controller.ex:6:unused_fun
Function skip_plug/2 will never be called.
________________________________________________________________________________
lib/pleroma/web/mastodon_api/controllers/directory_controller.ex:18:guard_fail
The guard clause:
when _action :: atom() == <<105, 110, 100, 101, 120>>
can never succeed.
-rw-r--r-- | changelog.d/mastodon_directory.fix | 1 | ||||
-rw-r--r-- | lib/pleroma/web/mastodon_api/controllers/directory_controller.ex | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.d/mastodon_directory.fix b/changelog.d/mastodon_directory.fix new file mode 100644 index 000000000..937c8f864 --- /dev/null +++ b/changelog.d/mastodon_directory.fix @@ -0,0 +1 @@ +Mastodon API /api/v1/directory: Fix listing directory contents when not authenticated diff --git a/lib/pleroma/web/mastodon_api/controllers/directory_controller.ex b/lib/pleroma/web/mastodon_api/controllers/directory_controller.ex index 253f06cfb..f89425966 100644 --- a/lib/pleroma/web/mastodon_api/controllers/directory_controller.ex +++ b/lib/pleroma/web/mastodon_api/controllers/directory_controller.ex @@ -15,7 +15,7 @@ defmodule Pleroma.Web.MastodonAPI.DirectoryController do plug(Pleroma.Web.ApiSpec.CastAndValidate) - plug(:skip_auth when action == "index") + plug(:skip_auth when action == :index) defdelegate open_api_operation(action), to: Pleroma.Web.ApiSpec.DirectoryOperation |