aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorkaniini <nenolod@gmail.com>2019-05-29 22:10:16 +0000
committerkaniini <nenolod@gmail.com>2019-05-29 22:10:16 +0000
commit6aec0d1b58c12db2fa669fcff043338174290a35 (patch)
treeeeba000b2656b6276e11a0a90e424cdc83bec5e1 /lib
parent7e889786b82b1b988cf6b8c572ac2b0d8de900d2 (diff)
downloadpleroma-6aec0d1b58c12db2fa669fcff043338174290a35.tar.gz
Revert "Merge branch 'feature/search-authenticated-only' into 'develop'"
This reverts merge request !1209
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/router.ex20
1 files changed, 6 insertions, 14 deletions
diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex
index 08c74a742..352268b96 100644
--- a/lib/pleroma/web/router.ex
+++ b/lib/pleroma/web/router.ex
@@ -414,12 +414,7 @@ defmodule Pleroma.Web.Router do
get("/trends", MastodonAPIController, :empty_array)
- scope [] do
- pipe_through(:oauth_read)
-
- get("/search", MastodonAPIController, :search)
- get("/accounts/search", MastodonAPIController, :account_search)
- end
+ get("/accounts/search", MastodonAPIController, :account_search)
scope [] do
pipe_through(:oauth_read_or_public)
@@ -436,12 +431,14 @@ defmodule Pleroma.Web.Router do
get("/accounts/:id/following", MastodonAPIController, :following)
get("/accounts/:id", MastodonAPIController, :user)
+ get("/search", MastodonAPIController, :search)
+
get("/pleroma/accounts/:id/favourites", MastodonAPIController, :user_favourites)
end
end
scope "/api/v2", Pleroma.Web.MastodonAPI do
- pipe_through([:api, :oauth_read])
+ pipe_through([:api, :oauth_read_or_public])
get("/search", MastodonAPIController, :search2)
end
@@ -483,13 +480,8 @@ defmodule Pleroma.Web.Router do
get("/statuses/show/:id", TwitterAPI.Controller, :fetch_status)
get("/statusnet/conversation/:id", TwitterAPI.Controller, :fetch_conversation)
- get("/statusnet/tags/timeline/:tag", TwitterAPI.Controller, :public_and_external_timeline)
- end
-
- scope [] do
- pipe_through(:oauth_read)
-
get("/search", TwitterAPI.Controller, :search)
+ get("/statusnet/tags/timeline/:tag", TwitterAPI.Controller, :public_and_external_timeline)
end
end
@@ -508,7 +500,7 @@ defmodule Pleroma.Web.Router do
end
scope "/api", Pleroma.Web, as: :twitter_api_search do
- pipe_through([:api, :oauth_read])
+ pipe_through([:api, :oauth_read_or_public])
get("/pleroma/search_user", TwitterAPI.Controller, :search_user)
end